From 515bf0a51a077b6f807b3be138c5d11e8e69a7e7 Mon Sep 17 00:00:00 2001 From: teodor Date: Thu, 10 Jul 2008 17:59:15 +0000 Subject: [PATCH] Fix commented code --- sfxstr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/sfxstr.c b/sfxstr.c index b94f576..0803345 100644 --- a/sfxstr.c +++ b/sfxstr.c @@ -150,10 +150,10 @@ SFSFindData(SFSTree *info, char *word, int len) { while( node && !ISEND(ptr, word, len) ) { if ( node->isskip ) { - /* + if ( len>0 && len - (((char*)ptr) - word) > node->nchar ) return NULL; - else */ if ( STRNCMP(ptr, ((char*)node)+node->dataptr, node->nchar) ) { + else if ( STRNCMP(ptr, ((char*)node)+node->dataptr, node->nchar) ) { ptr+=node->nchar; if ( ISEND(ptr, word, len) && node->isword) { return (void*) ( ((char*)(node->data)) + ((node->haschild) ? sizeof(SFSNode*) : 0) ); -- 2.46.1