Author: cazfi
Date: Thu Dec 15 10:11:42 2016
New Revision: 34718

URL: http://svn.gna.org/viewcvs/freeciv?rev=34718&view=rev
Log:
Corrected keys rulesave uses when saving server settings.

See bug #25384

Modified:
    branches/S2_6/tools/ruledit/rulesave.c

Modified: branches/S2_6/tools/ruledit/rulesave.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/tools/ruledit/rulesave.c?rev=34718&r1=34717&r2=34718&view=diff
==============================================================================
--- branches/S2_6/tools/ruledit/rulesave.c      (original)
+++ branches/S2_6/tools/ruledit/rulesave.c      Thu Dec 15 10:11:42 2016
@@ -1064,34 +1064,36 @@
   set_count = 0;
   settings_iterate(SSET_ALL, pset) {
     if (setting_get_setdef(pset) == SETDEF_RULESET || setting_locked(pset)) {
-      secfile_insert_str(sfile, setting_name(pset), "settings.name%d", 
set_count);
+      secfile_insert_str(sfile, setting_name(pset),
+                         "settings.set%d.name", set_count);
       switch (setting_type(pset)) {
       case SSET_BOOL:
         secfile_insert_bool(sfile, setting_bool_get(pset),
-                            "settings.value%d", set_count);
+                            "settings.set%d.value", set_count);
         break;
       case SSET_INT:
         secfile_insert_int(sfile, setting_int_get(pset),
-                           "settings.value%d", set_count);
+                           "settings.set%d.value", set_count);
         break;
       case SSET_STRING:
         secfile_insert_str(sfile, setting_str_get(pset),
-                           "settings.value%d", set_count);
+                           "settings.set%d.value", set_count);
         break;
       case SSET_ENUM:
         secfile_insert_enum_data(sfile, read_enum_value(pset), FALSE,
                                  setting_enum_secfile_str, pset,
-                                 "settings.value%d", set_count);
+                                 "settings.set%d.value", set_count);
         break;
       case SSET_BITWISE:
         secfile_insert_enum_data(sfile, setting_bitwise_get(pset), TRUE,
                                  setting_bitwise_secfile_str, pset,
-                                 "settings.value%d", set_count);
+                                 "settings.set%d.value", set_count);
         break;
       }
 
       if (locks) {
-        secfile_insert_bool(sfile, setting_locked(pset), "settings.lock%d", 
set_count);
+        secfile_insert_bool(sfile, setting_locked(pset),
+                            "settings.set%d.lock", set_count);
       }
 
       set_count++;


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

Reply via email to