From a700ac463ea3a34a78a5de15a488b28f0932c91a Mon Sep 17 00:00:00 2001 From: momacabu Date: Fri, 23 Nov 2012 04:19:16 +0000 Subject: - There will now be a warning regarding to map name length limitation (part of bugreport:1688). git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@16950 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/tool/mapcache.c | 2 ++ 1 file changed, 2 insertions(+) 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); -- cgit v1.2.3-70-g09d2