diff --git a/src/comp.c b/src/comp.c index 436e188..74f3185 100644 --- a/src/comp.c +++ b/src/comp.c @@ -25,14 +25,18 @@ int cmp_find_many(usize nhaystacks; const map_t *pIN needle, usize sizes[pOUT nh va_start(v_haystacks, nhaystacks); const map_t* pINOUT haystack; + register int rval=-1; for(usize i=0;iorigin) FATAL("haystack %lu was null or its origin was null", i); - if(!cmp_find(needle, haystack, size)) return (int)i; + if(!cmp_find(needle, haystack, size)) { + rval = (int)i; + break; + } } va_end(v_haystacks); - return -1; + return rval; }