diff options
Diffstat (limited to 'src/misc')
-rw-r--r-- | src/misc/str.hpp | 2 |
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; |