Index: obj_arc.h =================================================================== --- obj_arc.h (revision 7775) +++ obj_arc.h (revision 7776) @@ -96,7 +96,7 @@ #define PCB_ARC_ALL_LOOP(top) do { \ pcb_cardinal_t l; \ pcb_layer_t *layer = (top)->Layer; \ - for (l =0; l < pcb_max_layer; l++, layer++) \ + for (l =0; l < (top)->LayerN; l++, layer++) \ { \ PCB_ARC_LOOP(layer) @@ -103,7 +103,7 @@ #define PCB_ARC_COPPER_LOOP(top) do { \ pcb_cardinal_t l; \ pcb_layer_t *layer = (top)->Layer; \ - for (l =0; l < pcb_max_layer; l++, layer++) \ + for (l =0; l < (top)->LayerN; l++, layer++) \ { \ if (!(pcb_layer_flags(l) & PCB_LYT_COPPER)) continue; \ PCB_ARC_LOOP(layer) @@ -111,7 +111,7 @@ #define PCB_ARC_SILK_LOOP(top) do { \ pcb_cardinal_t l; \ pcb_layer_t *layer = (top)->Layer; \ - for (l = 0; l < pcb_max_layer; l++, layer++) \ + for (l = 0; l < (top)->LayerN; l++, layer++) \ { \ if (!(pcb_layer_flags(l) & PCB_LYT_SILK)) continue; \ PCB_ARC_LOOP(layer) @@ -119,7 +119,7 @@ #define PCB_ARC_VISIBLE_LOOP(top) do { \ pcb_cardinal_t l; \ pcb_layer_t *layer = (top)->Layer; \ - for (l = 0; l < pcb_max_layer; l++, layer++) \ + for (l = 0; l < (top)->LayerN; l++, layer++) \ { \ if (layer->On) \ PCB_ARC_LOOP(layer)