Replace confusing buffer calls in vssprintf

This is basically just resizing the buffer ahead of the vsnprintf, no
need for the extra Release/GetBuffer indirection.
This commit is contained in:
Arthur Eubanks
2025-04-20 18:21:13 -07:00
committed by teejusb
parent 9131dc6b68
commit 5323bf998e
+2 -2
View File
@@ -405,8 +405,8 @@ RString vssprintf( const char *szFormat, va_list argList )
va_end(tmp);
RString sRet;
std::vsnprintf( sRet.GetBuffer(iNeeded), iNeeded+1, szFormat, argList );
sRet.ReleaseBuffer( iNeeded );
sRet.resize(iNeeded);
std::vsnprintf( &sRet.front(), iNeeded+1, szFormat, argList );
return sRet;
}