From: teodor Date: Fri, 26 Sep 2008 23:13:14 +0000 (+0000) Subject: Fix searching key with presented its length X-Git-Url: http://sigaev.ru/git/gitweb.cgi?a=commitdiff_plain;h=654d594fd43a950db71f61ab770a82f148bf622b;p=tedtools.git Fix searching key with presented its length --- diff --git a/sfxstr.c b/sfxstr.c index 3eb12c4..4a4e4da 100644 --- 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;