... | ... |
@@ -1630,6 +1630,10 @@ redata_searchbackwards(redata_t *redata, long posini, char *str, int len) |
1630 | 1630 |
return(posini); /* nothing to do, empty string is always equal */ |
1631 | 1631 |
if(redata_getposptr(redata,posini,&numchunk,&offset)!=0) |
1632 | 1632 |
return(-1); /* couldn't get pos */ |
1633 |
+ while((numchunk+1)<redata->sizechunks && offset==redata->chunks[numchunk]->useddata) { |
|
1634 |
+ numchunk++; |
|
1635 |
+ offset=0; |
|
1636 |
+ } |
|
1633 | 1637 |
chunkstartpos=posini-offset; |
1634 | 1638 |
for(offset++;numchunk>=0 |
1635 | 1639 |
;numchunk-- |