projects
/
idzebra-moved-to-github.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
f459d02
)
Fix bug #4592: dict_scan misses
author
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 31 Aug 2011 17:40:01 +0000
(19:40 +0200)
committer
Adam Dickmeiss
<adam@indexdata.dk>
Wed, 31 Aug 2011 17:40:01 +0000
(19:40 +0200)
dict/scan.c
patch
|
blob
|
history
diff --git
a/dict/scan.c
b/dict/scan.c
index
bbf1374
..
76032f3
100644
(file)
--- 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);
}
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;
}
}
break;
}