aboutsummaryrefslogtreecommitdiffhomepage
path: root/lib/query.cc
diff options
context:
space:
mode:
authorGravatar Carl Worth <cworth@cworth.org>2009-11-12 20:09:12 -0800
committerGravatar Carl Worth <cworth@cworth.org>2009-11-12 20:09:12 -0800
commit523f1ce0a5e1cbe62dc9b879f224d6b60631322f (patch)
tree042a714f5ef3f5b00937f08ce3e9367e75da3965 /lib/query.cc
parent93dcc3b695e19dd36cc8f638c6e01ecbbd9a447d (diff)
notmuch search: Fix to actually return something.
This serves me right for committing untested code. The notmuch_query_search_threads was totally broken, (it didn't properly treat -1 as being unlimited and instead returned no threads in that case).
Diffstat (limited to 'lib/query.cc')
-rw-r--r--lib/query.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/query.cc b/lib/query.cc
index 1777e47d..2169709c 100644
--- a/lib/query.cc
+++ b/lib/query.cc
@@ -200,7 +200,7 @@ notmuch_query_search_threads (notmuch_query_t *query,
seen = g_hash_table_new_full (g_str_hash, g_str_equal,
free, NULL);
- while (threads_seen < first + max_threads)
+ while (max_threads < 0 || threads_seen < first + max_threads)
{
int messages_seen_previously = messages_seen;