Fixed issue #266.

This commit is contained in:
Бранимир Караџић
2023-05-17 19:35:19 -07:00
parent fbbc2c6ecb
commit 76642c9bfc
2 changed files with 28 additions and 10 deletions

View File

@@ -1207,15 +1207,14 @@ namespace bx
int32_t size = write(&writer, _format, argListCopy, &err);
va_end(argListCopy);
size += write(&writer, '\0', &err);
if (err.isOk() )
{
size += write(&writer, '\0', &err);
return size - 1 /* size without '\0' terminator */;
}
else
{
_out[_max-1] = '\0';
}
_out[_max-1] = '\0';
}
Error err;