X-Git-Url: https://git.cworth.org/git?p=mnemon;a=blobdiff_plain;f=mnemon.c;h=f80d67b10a15ede75c5095b005513dbb4622307e;hp=45e09308e53f017bfc63905463c1be7469ee387d;hb=c8351131dab5b541b3c29684e5b1ad6a995b79f4;hpb=3798e9e4f004ee61392de72e5e0f6020d982c870 diff --git a/mnemon.c b/mnemon.c index 45e0930..f80d67b 100644 --- a/mnemon.c +++ b/mnemon.c @@ -372,7 +372,8 @@ mnemon_get_bin (mnemon_t *mnemon, bin = &mnemon->bins[i]; /* Make room to insert new bin at its sorted location. */ - memmove (bin + 1, bin, (mnemon->num_bins - i) * sizeof (bin_t)); + if (i < mnemon->num_bins) + memmove (bin + 1, bin, (mnemon->num_bins - i) * sizeof (bin_t)); mnemon->num_bins++; bin_init (bin, count); @@ -702,7 +703,7 @@ mnemon_do_challenges (mnemon_t *mnemon, } else if (item->count == 1) { printf ("On your first try, no less!"); } else { - printf ("Masterful."); + printf ("Masterful (%dx).", item->count); } } else { printf (" %s is the correct answer.",