Fix valgrind complaint in wizmode terrain

The code was writing characters into row[x-1] in the loop, but putting the
string terminator at row[x], leaving one character between uninitialized.
This commit is contained in:
Pasi Kallinen
2016-12-23 13:34:06 +02:00
parent d606b2a8ff
commit 1a1adfee3e

View File

@@ -920,6 +920,7 @@ wiz_map_levltyp(VOID_ARGS)
? 'a' + terrain - 10
: 'A' + terrain - 36);
}
x--;
if (levl[0][y].typ != STONE || may_dig(0, y))
row[x++] = '!';
row[x] = '\0';