X-Git-Url: https://git.cworth.org/git?p=wordgame;a=blobdiff_plain;f=dict.c;fp=dict.c;h=b2ad4952c9604f6990f095a35d846167499f38ad;hp=11ddaf1ebd1afe73db7ede92b7438c4622dd01f3;hb=a26e439b57a16e31a8fb67a079cbad659c21fd39;hpb=a14ef3b1c9d6cc4142da7effc872efacdcd325c0 diff --git a/dict.c b/dict.c index 11ddaf1..b2ad495 100644 --- a/dict.c +++ b/dict.c @@ -231,7 +231,7 @@ trie_for_each_of_length_if (trie_t *trie, action (closure, string->s, &trie->flags); } - if (length == max_length) + if (max_length > 0 && length == max_length) return count; /* Loop over each element, appending the character and recursing. */