diff options
author | jackpoz <giacomopoz@gmail.com> | 2018-12-16 12:09:20 +0100 |
---|---|---|
committer | Shauren <shauren.trinity@gmail.com> | 2021-11-16 20:37:27 +0100 |
commit | 9dcbccce26a1a0eaa52c3fd57294b0ab186faa30 (patch) | |
tree | 526749c325c3b826b1172458a9cf5979a69c7cae | |
parent | d5c41d23e67e3813adf09ee84afa636b2192c891 (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
(cherry picked from commit eee1f2cadf8174caca4849c22ba1fb8f12fc9e08)
-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 7ad137715da..f44f8d9105c 100644 --- a/src/common/Debugging/Errors.cpp +++ b/src/common/Debugging/Errors.cpp @@ -59,7 +59,7 @@ namespace va_end(len); formatted.resize(length); - vsnprintf(&formatted[0], length, format, args); + vsnprintf(&formatted[0], length + 1, format, args); return formatted; } |