Author: jtn
Date: Sat May 13 12:02:18 2017
New Revision: 35531

URL: http://svn.gna.org/viewcvs/freeciv?rev=35531&view=rev
Log:
Bomb out after failing to load ruleset during savegame loading.

Since first parameter of sg_failure_ret() is an assert kind of pattern
to decide if any error handling is needed, having 'TRUE' there is
certainly an error. There is one such case, when loading of ruleset has
failed.

Patch by Marko Lindqvist.

See hrm bug #659503.

Modified:
    trunk/server/savegame2.c
    trunk/server/savegame3.c

Modified: trunk/server/savegame2.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/savegame2.c?rev=35531&r1=35530&r2=35531&view=diff
==============================================================================
--- trunk/server/savegame2.c    (original)
+++ trunk/server/savegame2.c    Sat May 13 12:02:18 2017
@@ -1099,7 +1099,7 @@
   }
   if (!load_rulesets(NULL, FALSE, TRUE, FALSE)) {
     /* Failed to load correct ruleset */
-    sg_failure_ret(TRUE, _("Failed to load ruleset"));
+    sg_failure_ret(FALSE, _("Failed to load ruleset"));
   }
 }
 

Modified: trunk/server/savegame3.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/savegame3.c?rev=35531&r1=35530&r2=35531&view=diff
==============================================================================
--- trunk/server/savegame3.c    (original)
+++ trunk/server/savegame3.c    Sat May 13 12:02:18 2017
@@ -1318,7 +1318,7 @@
     }
     if (!load_rulesets(NULL, FALSE, TRUE, FALSE)) {
       /* Failed to load correct ruleset */
-      sg_failure_ret(TRUE, "Failed to load ruleset");
+      sg_failure_ret(FALSE, "Failed to load ruleset");
     }
   }
 


_______________________________________________
Freeciv-commits mailing list
Freeciv-commits@gna.org
https://mail.gna.org/listinfo/freeciv-commits

Reply via email to