Author: cazfi
Date: Thu Oct 15 18:58:02 2015
New Revision: 30096

URL: http://svn.gna.org/viewcvs/freeciv?rev=30096&view=rev
Log:
Check unused entries from game.ruleset only after also settings have been 
loaded.

See patch #6407

Modified:
    trunk/server/ruleset.c

Modified: trunk/server/ruleset.c
URL: 
http://svn.gna.org/viewcvs/freeciv/trunk/server/ruleset.c?rev=30096&r1=30095&r2=30096&view=diff
==============================================================================
--- trunk/server/ruleset.c      (original)
+++ trunk/server/ruleset.c      Thu Oct 15 18:58:02 2015
@@ -5977,9 +5977,8 @@
     }
   }
 
-  if (ok) {
-    secfile_check_unused(file);
-  }
+  /* secfile_check_unused() is not here, but only after also settings section
+   * has been loaded. */
 
   return ok;
 }
@@ -7134,6 +7133,10 @@
   if (ok) {
     /* Only load settings for a sane ruleset */
     ok = settings_ruleset(gamefile, "settings", act);
+
+    if (ok) {
+      secfile_check_unused(gamefile);
+    }
   }
 
   nullcheck_secfile_destroy(techfile);


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

Reply via email to