Author: cazfi Date: Fri May 5 08:02:40 2017 New Revision: 35401 URL: http://svn.gna.org/viewcvs/freeciv?rev=35401&view=rev Log: Fix gcc7 warning
See hrm Feature #657332 Modified: branches/S2_5/server/savegame.c Modified: branches/S2_5/server/savegame.c URL: http://svn.gna.org/viewcvs/freeciv/branches/S2_5/server/savegame.c?rev=35401&r1=35400&r2=35401&view=diff ============================================================================== --- branches/S2_5/server/savegame.c (original) +++ branches/S2_5/server/savegame.c Fri May 5 08:02:40 2017 @@ -947,8 +947,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), @@ -985,7 +985,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)) { @@ -1006,7 +1006,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