]> git.cworth.org Git - mnemon/commitdiff
Fix to not pull from bin with score 0 when there are no items to introduce.
authorCarl Worth <cworth@cworth.org>
Sun, 22 Apr 2007 17:48:48 +0000 (10:48 -0700)
committerCarl Worth <cworth@cworth.org>
Sun, 22 Apr 2007 17:48:48 +0000 (10:48 -0700)
mnemon.c

index f4af000a5e413cc59a71860cec0c18f429c5ccb8..72c5174cd7e1ba067b3dcabb79cd5397f35c5ab8 100644 (file)
--- a/mnemon.c
+++ b/mnemon.c
@@ -651,6 +651,13 @@ mnemon_do_challenges (mnemon_t *mnemon,
     if (to_introduce < 0)
        to_introduce = 0;
 
+    /* Get rid of bin with score of 0 if we aren't going to be
+     * introducing anything from it. */
+    if (to_introduce == 0) {
+       bin = mnemon_get_bin (mnemon, 0);
+       mnemon_remove_bin (mnemon, bin);        
+    }
+
     if (unlearned) {
        printf ("You've got %d items to learn already. ", unlearned);
        if (to_introduce)