(svn r7280) -Codechange: Replace some sprintf() functions with the safer snprintf() functions
This commit is contained in:
2
map.c
2
map.c
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user