diff options
author | jackpoz <giacomopoz@gmail.com> | 2018-12-16 12:09:20 +0100 |
---|---|---|
committer | jackpoz <giacomopoz@gmail.com> | 2018-12-16 12:09:20 +0100 |
commit | eee1f2cadf8174caca4849c22ba1fb8f12fc9e08 (patch) | |
tree | 033a1d8eefb4f213a8f133d8b6b7db61911dbb9b /src/common/Debugging/Errors.cpp | |
parent | 9a924fb9d557434c5a2e4020c80db6e6bfe466ad (diff) |
Core/Misc: Fix vsnprintf usage in ASSERT()
Fix vsnprintf to follow standard definition and not some old VC++ behavior, not requiring to include the '\0' character in the count parameter
Diffstat (limited to 'src/common/Debugging/Errors.cpp')
-rw-r--r-- | src/common/Debugging/Errors.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/Debugging/Errors.cpp b/src/common/Debugging/Errors.cpp index fc4ecb5f2c8..9ffd4c378ca 100644 --- a/src/common/Debugging/Errors.cpp +++ b/src/common/Debugging/Errors.cpp @@ -60,7 +60,7 @@ namespace va_end(len); formatted.resize(length); - vsnprintf(&formatted[0], length, format, args); + vsnprintf(&formatted[0], length + 1, format, args); return formatted; } |