summaryrefslogtreecommitdiff
path: root/map.c
diff options
context:
space:
mode:
authorDarkvater <darkvater@openttd.org>2006-11-28 20:55:16 +0000
committerDarkvater <darkvater@openttd.org>2006-11-28 20:55:16 +0000
commit7c945bf8283d381ebf7982377b639f163f23a1ea (patch)
tree5c4e14a6ee9c764ba23ada2a4c72dcc0ade951c2 /map.c
parentdcbbda0cb9674e8fc9aaa64a0861fd6381ae4202 (diff)
downloadopenttd-7c945bf8283d381ebf7982377b639f163f23a1ea.tar.xz
(svn r7280) -Codechange: Replace some sprintf() functions with the safer snprintf() functions
Diffstat (limited to 'map.c')
-rw-r--r--map.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/map.c b/map.c
index cb97a69b2..9901c7eb8 100644
--- a/map.c
+++ b/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);