Author: cazfi
Date: Fri May  5 08:02:29 2017
New Revision: 35400

URL: http://svn.gna.org/viewcvs/freeciv?rev=35400&view=rev
Log:
Fix gcc7 warning

See hrm Feature #657332

Modified:
    branches/S2_6/server/savegame.c

Modified: branches/S2_6/server/savegame.c
URL: 
http://svn.gna.org/viewcvs/freeciv/branches/S2_6/server/savegame.c?rev=35400&r1=35399&r2=35400&view=diff
==============================================================================
--- branches/S2_6/server/savegame.c     (original)
+++ branches/S2_6/server/savegame.c     Fri May  5 08:02:29 2017
@@ -946,8 +946,8 @@
                  ptile->resource = identifier_to_resource(ch));
 
     special_halfbyte_iterate(j, num_special_types) {
-      char buf[16]; /* enough for sprintf() below */
-      sprintf (buf, "map.spe%02d_%%03d", j);
+      char buf[20]; /* enough for sprintf() below */
+      sprintf(buf, "map.spe%02d_%%03d", j);
 
       LOAD_MAP_DATA(ch, nat_y, ptile,
          secfile_lookup_str(file, buf, nat_y),
@@ -984,7 +984,7 @@
   /* after the resources are loaded, indicate those currently valid */
   whole_map_iterate(ptile) {
     if (NULL == ptile->resource
-     || NULL == ptile->terrain) {
+       || NULL == ptile->terrain) {
       continue;
     }
     if (terrain_has_resource(ptile->terrain, ptile->resource)) {
@@ -1005,7 +1005,7 @@
     zeroline[i] = '\0';
 
     bases_halfbyte_iterate(j, num_bases_types) {
-      char buf[16]; /* enough for sprintf() below */
+      char buf[20]; /* enough for sprintf() below */
       sprintf(buf, "map.b%02d_%%03d", j);
 
       LOAD_MAP_DATA(ch, nat_y, ptile,


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

Reply via email to