From eee1f2cadf8174caca4849c22ba1fb8f12fc9e08 Mon Sep 17 00:00:00 2001 From: jackpoz Date: Sun, 16 Dec 2018 12:09:20 +0100 Subject: 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 --- src/common/Debugging/Errors.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') 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; } -- cgit v1.2.3