Index: src/board.c =================================================================== --- src/board.c (revision 32001) +++ src/board.c (revision 32002) @@ -426,8 +426,10 @@ pcb_layergrp_t *grp; rnd_coord_t curr, total = 0; - if (from > to) + if (from > to) { rnd_swap(rnd_layergrp_id_t, from, to); + rnd_swap(int, include_from, include_to); + } if (!include_from) from++;