[Tux4kids-commits] r479 - in tuxmath/trunk: po src

tholy-guest at alioth.debian.org tholy-guest at alioth.debian.org
Mon May 5 11:57:10 UTC 2008


Author: tholy-guest
Date: 2008-05-05 11:57:09 +0000 (Mon, 05 May 2008)
New Revision: 479

Modified:
   tuxmath/trunk/po/
   tuxmath/trunk/src/mathcards.c
Log:
Add fix for starting game with "wrongs" question list.



Property changes on: tuxmath/trunk/po
___________________________________________________________________
Name: svn:ignore
   + *.gmo


Modified: tuxmath/trunk/src/mathcards.c
===================================================================
--- tuxmath/trunk/src/mathcards.c	2008-05-05 11:06:53 UTC (rev 478)
+++ tuxmath/trunk/src/mathcards.c	2008-05-05 11:57:09 UTC (rev 479)
@@ -307,7 +307,12 @@
 
     /* initialize lists for new game: */
     delete_list(question_list);
-    question_list = randomize_list(wrong_quests);
+    if(!randomize_list(&wrong_quests)) {
+      fprintf(stderr, "Error during randomization of wrong_quests!\n");
+      /* Punt on trying wrong question list, just run normal game */
+      return MC_StartGame();
+    }
+    question_list = wrong_quests;
     wrong_quests = 0;
     next_wrong_quest = 0; 
    /* initialize counters for new game: */




More information about the Tux4kids-commits mailing list