Index: trunk/src_plugins/lib_compat_help/pstk_help.c =================================================================== --- trunk/src_plugins/lib_compat_help/pstk_help.c (revision 36393) +++ trunk/src_plugins/lib_compat_help/pstk_help.c (revision 36394) @@ -121,6 +121,13 @@ return res; } +static void clear_found(vtp0_t *objs) +{ + long n; + for(n = 0; n < objs->used; n++) + PCB_FLAG_CLEAR(PCB_FLAG_FOUND, (pcb_any_obj_t *)(objs->array[n])); +} + int pcb_pstk_vect2pstk_thr(pcb_data_t *data, vtp0_t *objs, rnd_bool_t quiet) { int l, n, plated, done = 0, ci; @@ -130,7 +137,7 @@ int num_cand[NUM_LYTS]; /* output padstacks are going to be marked with the FOUND flag */ - for(n = 0; n < objs->used; n++) PCB_FLAG_CLEAR(PCB_FLAG_FOUND, (pcb_any_obj_t *)(objs->array[n])); + clear_found(objs); for(n = 0; n < objs->used; n++) { pcb_any_obj_t *h = objs->array[n]; @@ -206,8 +213,8 @@ } } - /* output padstacks are going to be marked with the FOUND flag */ - for(n = 0; n < objs->used; n++) PCB_FLAG_CLEAR(PCB_FLAG_FOUND, (pcb_any_obj_t *)(objs->array[n])); + /* output padstacks shouldn't be FOUND */ + clear_found(objs); return done; } @@ -220,7 +227,7 @@ int num_cand[NUM_LYTS]; /* output padstacks are going to be marked with the FOUND flag */ - for(n = 0; n < objs->used; n++) PCB_FLAG_CLEAR(PCB_FLAG_FOUND, (pcb_any_obj_t *)(objs->array[n])); + clear_found(objs); for(n = 0; n < objs->used; n++) { pcb_any_obj_t *o = objs->array[n]; @@ -277,6 +284,9 @@ } } + /* output padstacks shouldn't be FOUND */ + clear_found(objs); + return done; }