(svn r7280) -Codechange: Replace some sprintf() functions with the safer snprintf() functions

This commit is contained in:
Darkvater
2006-11-28 20:55:16 +00:00
parent ea965a4adf
commit b9eed21679
8 changed files with 21 additions and 20 deletions

2
map.c
View File

@@ -67,7 +67,7 @@ TileIndex TileAdd(TileIndex tile, TileIndexDiff add,
if (x >= MapSizeX() || y >= MapSizeY()) {
char buf[512];
sprintf(buf, "TILE_ADD(%s) when adding 0x%.4X and 0x%.4X failed",
snprintf(buf, lengthof(buf), "TILE_ADD(%s) when adding 0x%.4X and 0x%.4X failed",
exp, tile, add);
#if !defined(_MSC_VER)
fprintf(stderr, "%s:%d %s\n", file, line, buf);