stl_vsprintf: avoid truncating 4096-byte strings

develop
lethosor 2017-07-13 13:08:27 -04:00
parent ce1158780f
commit 15ed1bfd67
1 changed files with 1 additions and 1 deletions

@ -68,7 +68,7 @@ std::string stl_vsprintf(const char *fmt, va_list args) {
if (rsz < 0) if (rsz < 0)
buf.resize(buf.size()*2); buf.resize(buf.size()*2);
else if (unsigned(rsz) > buf.size()) else if (unsigned(rsz) >= buf.size())
buf.resize(rsz+1); buf.resize(rsz+1);
else else
return std::string(&buf[0], rsz); return std::string(&buf[0], rsz);