From: Timo Sirainen Date: Wed, 11 Jun 2008 22:48:48 +0000 (+0300) Subject: SEARCH: Fixed NOT not matching anything. X-Git-Tag: 1.2.alpha1~333 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=4b2cb2b4d7e2291e73b00ad669df417d7fee4d8d;p=thirdparty%2Fdovecot%2Fcore.git SEARCH: Fixed NOT not matching anything. --HG-- branch : HEAD --- diff --git a/src/lib-storage/index/index-search.c b/src/lib-storage/index/index-search.c index 1ae4e1e4df..c1856322ca 100644 --- a/src/lib-storage/index/index-search.c +++ b/src/lib-storage/index/index-search.c @@ -639,8 +639,8 @@ static bool search_msgset_fix_limits(const struct mail_index_header *hdr, else { /* if all messages are in the range, it can't match */ range = array_get_modifiable(seqset, &count); - return range[0].seq1 == 1 && - range[count-1].seq2 == hdr->messages_count; + return range[0].seq1 != 1 || + range[count-1].seq2 != hdr->messages_count; } }