From e61fe2123728dd4cd2eba3ed628905b337ddff19 Mon Sep 17 00:00:00 2001 From: rubidium Date: Thu, 24 Apr 2014 19:51:45 +0000 Subject: (svn r26506) -Codechange: replace most of vsnprintf with vseprintf --- src/misc/str.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/misc') 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 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; -- cgit v1.2.3-70-g09d2