~mdw
/
sgt
/
agedu
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
acaf12c
)
Fix a segfault in the case where the entire recursive scan covers
author
simon
<simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 25 Nov 2008 18:08:17 +0000
(18:08 +0000)
committer
simon
<simon@cda61777-01e9-0310-a592-d414129be87e>
Tue, 25 Nov 2008 18:08:17 +0000
(18:08 +0000)
only one filename.
git-svn-id: svn://svn.tartarus.org/sgt/agedu@8328
cda61777
-01e9-0310-a592-
d414129be87e
trie.c
patch
|
blob
|
blame
|
history
diff --git
a/trie.c
b/trie.c
index
345756f
..
ddadddb
100644
(file)
--- a/
trie.c
+++ b/
trie.c
@@
-218,7
+218,8
@@
static off_t triebuild_unwind(triebuild *tb, int targetdepth, int *outcount)
while (depth > targetdepth) {
int odepth = depth;
while (depth > targetdepth &&
- (depth-1 > tb->switchsize || tb->switches[depth-1].len == 0))
+ (depth-1 > tb->switchsize || !tb->switches ||
+ tb->switches[depth-1].len == 0))
depth--;
if (odepth > depth) {
/*