summaryrefslogtreecommitdiff
path: root/src/tool
diff options
context:
space:
mode:
Diffstat (limited to 'src/tool')
-rw-r--r--src/tool/mapcache.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/tool/mapcache.c b/src/tool/mapcache.c
index 2ead5edbb..59d70b62d 100644
--- a/src/tool/mapcache.c
+++ b/src/tool/mapcache.c
@@ -129,7 +129,7 @@ void cache_map(char *name, struct map_data *m)
encode_zip(write_buf, &len, m->cells, m->xs*m->ys);
// Fill the map header
- strncpy(info.name, name, MAP_NAME_LENGTH);
+ safestrncpy(info.name, name, MAP_NAME_LENGTH);
if (strlen(name) > MAP_NAME_LENGTH) // It does not hurt to warn that there are maps with name longer than allowed.
ShowWarning("Map name '%s' (length %"PRIuS") is too long. Truncating to '%s' (lentgh %d).\n",
name, strlen(name), info.name, MAP_NAME_LENGTH);