214 if (match) { |
214 if (match) { |
215 (*n)++; |
215 (*n)++; |
216 for (size_t j = 0 ; j < d.length ; j++) { |
216 for (size_t j = 0 ; j < d.length ; j++) { |
217 sv.ptr[i+j] = 0; |
217 sv.ptr[i+j] = 0; |
218 } |
218 } |
219 i += d.length; |
219 i += d.length - 1; // -1, because the loop will do a i++ |
220 } |
220 } |
221 } |
221 } |
222 if ((*n) == nmax) break; |
222 if ((*n) == nmax) break; |
223 } |
223 } |
224 result = (sstr_t*) almalloc(allocator, sizeof(sstr_t)*(*n)); |
224 result = (sstr_t*) almalloc(allocator, sizeof(sstr_t)*(*n)); |