summaryrefslogtreecommitdiff
path: root/src/misc
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2014-04-24 19:51:45 +0000
committerrubidium <rubidium@openttd.org>2014-04-24 19:51:45 +0000
commite61fe2123728dd4cd2eba3ed628905b337ddff19 (patch)
treeaedd5865dbb78dc700d89d3f9478c73d90bcaf60 /src/misc
parentfad2d3c709a6d468024284d9e6b7830f7c62e917 (diff)
downloadopenttd-e61fe2123728dd4cd2eba3ed628905b337ddff19.tar.xz
(svn r26506) -Codechange: replace most of vsnprintf with vseprintf
Diffstat (limited to 'src/misc')
-rw-r--r--src/misc/str.hpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/misc/str.hpp b/src/misc/str.hpp
index b109b4e82..b982913fc 100644
--- a/src/misc/str.hpp
+++ b/src/misc/str.hpp
@@ -100,7 +100,7 @@ struct CStrA : public CBlobT<char>
int err = 0;
for (;;) {
char *buf = MakeFreeSpace(addSize);
- ret = vsnprintf(buf, base::GetReserve(), format, args);
+ ret = vseprintf(buf, buf + base::GetReserve() - 1, format, args);
if (ret >= (int)base::GetReserve()) {
/* Greater return than given count means needed buffer size. */
addSize = ret + 1;