Fix searching key with presented its length
authorteodor <teodor>
Fri, 26 Sep 2008 23:13:14 +0000 (23:13 +0000)
committerteodor <teodor>
Fri, 26 Sep 2008 23:13:14 +0000 (23:13 +0000)
sfxstr.c

index 3eb12c4..4a4e4da 100644 (file)
--- a/sfxstr.c
+++ b/sfxstr.c
@@ -181,7 +181,7 @@ SFSFindDataFromSavedOrSave(SFSTree *info, SFSDataIO *in, SFSTreePosition *positi
                }
 
                if ( node->isskip ) {
-                       if ( in->keylen>0 &&  in->keylen - (((char*)ptr) - in->key) > node->nchar )
+                       if ( in->keylen>0 &&  in->keylen - (((char*)ptr) - in->key) < node->nchar )
                                return NULL;
                        else if ( STRNCMP(ptr, ((char*)node)+node->dataptr, node->nchar) ) {
                                ptr+=node->nchar;