From: Adam Dickmeiss Date: Wed, 31 Aug 2011 17:40:01 +0000 (+0200) Subject: Fix bug #4592: dict_scan misses X-Git-Tag: v2.0.49~3 X-Git-Url: http://git.indexdata.com/?p=idzebra-moved-to-github.git;a=commitdiff_plain;h=b77bd2711727692478a0d7d1e0703d4194831cef Fix bug #4592: dict_scan misses --- diff --git a/dict/scan.c b/dict/scan.c index bbf1374..76032f3 100644 --- a/dict/scan.c +++ b/dict/scan.c @@ -199,10 +199,27 @@ void dict_scan_r(Dict dict, Dict_ptr ptr, int pos, Dict_char *str, scan_direction(dict, subptr, pos+1, str, -1, after, client, userfunc, 1); } - else if (subptr) + else { - dict_scan_r(dict, subptr, pos+1, str, before, after, - client, userfunc); + if (subptr) + dict_scan_r(dict, subptr, pos+1, str, before, after, + client, userfunc); + if (info[sizeof(Dict_ptr)+sizeof(Dict_char)]) + { + if (*before) + { + str[pos+1] = DICT_EOS; + if ((*userfunc)((char*) str, + info+sizeof(Dict_ptr)+ + sizeof(Dict_char), + - *before, client)) + { + *before = 0; + } + else + --(*before); + } + } } break; }