vsnprintf() expects a string of size _BufferCount - 1 because it always appends a null terminator (see https://www.cplusplus.com/reference/cstdio/vsnprintf/). This causes strprintf() to drop the last character.
A tested fix with Visual Studio 2022 is using bytes_needed + 1:
|
vsnprintf(&str[0], bytes_needed, format, vlist); |