summaryrefslogtreecommitdiff
path: root/src/openttd.cpp
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2008-10-28 14:42:31 +0000
committerrubidium <rubidium@openttd.org>2008-10-28 14:42:31 +0000
commit0d2f84e117e06db09414ec55b0c0c79f3e8c7bdb (patch)
treeb5fc23e46516c5f53edc37ad11559ac6e8586d4c /src/openttd.cpp
parent83e1a083d1e72dd97d4da87f3f5b055856e26b02 (diff)
downloadopenttd-0d2f84e117e06db09414ec55b0c0c79f3e8c7bdb.tar.xz
(svn r14540) -Codechange: introduce [v]seprintf which are like [v]snprintf but do return the number of characters written instead of the number of characters that would be written; as size_t is unsigned substraction can cause integer underflows quite quickly.
Diffstat (limited to 'src/openttd.cpp')
-rw-r--r--src/openttd.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/openttd.cpp b/src/openttd.cpp
index d4ef0e4fe..58d193b80 100644
--- a/src/openttd.cpp
+++ b/src/openttd.cpp
@@ -166,7 +166,7 @@ static void ShowHelp()
char buf[4096];
char *p = buf;
- p += snprintf(p, lengthof(buf), "OpenTTD %s\n", _openttd_revision);
+ p += seprintf(p, lastof(buf), "OpenTTD %s\n", _openttd_revision);
p = strecpy(p,
"\n"
"\n"