]> git.cworth.org Git - wordgame/blobdiff - dict.c
Increase the window size a bit
[wordgame] / dict.c
diff --git a/dict.c b/dict.c
index 11ddaf1ebd1afe73db7ede92b7438c4622dd01f3..68703dafc603bf377ae3688f1dff78e0a7028cb0 100644 (file)
--- a/dict.c
+++ b/dict.c
@@ -1,7 +1,7 @@
 /*
  * Copyright © 2006 Carl Worth
  *
- * This program is free software; you can redistribute it and\/or modify
+ * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
  * the Free Software Foundation; either version 2, or (at your option)
  * any later version.
@@ -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. */