diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/tool/mapcache.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/tool/mapcache.c b/src/tool/mapcache.c index b4c1a7c03..28688438a 100644 --- a/src/tool/mapcache.c +++ b/src/tool/mapcache.c @@ -176,6 +176,8 @@ void cache_map(char *name, struct map_data *m) encode_zip(write_buf, &len, m->cells, m->xs*m->ys); // Fill the map header + if (name > MAP_NAME_LENGTH) // It does not hurt to warn that there are maps with name longer than allowed. + ShowWarning ("Map name '%s' size '%d' is too long. Truncating to '%d'.\n", name, sizeof(name), MAP_NAME_LENGTH); strncpy(info.name, name, MAP_NAME_LENGTH); info.xs = MakeShortLE(m->xs); info.ys = MakeShortLE(m->ys); |