diff options
author | rubidium <rubidium@openttd.org> | 2008-10-28 14:42:31 +0000 |
---|---|---|
committer | rubidium <rubidium@openttd.org> | 2008-10-28 14:42:31 +0000 |
commit | 0d254e8914f294a8f9a0e177e2d0208e57b2d5c9 (patch) | |
tree | b5fc23e46516c5f53edc37ad11559ac6e8586d4c /src/openttd.cpp | |
parent | cf4cffd91adbe563e4cd9f892ad3ab54a2fef13e (diff) | |
download | openttd-0d254e8914f294a8f9a0e177e2d0208e57b2d5c9.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.cpp | 2 |
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" |