Bug 1449254 - Use vsnprintf for formatting DebugDump() output on Windows, too. r=mrbkap

Since VS2015, vsnprintf is supposed to be C99-compliant on Windows, too and will
especially always null-terminate the string written into the given buffer.

In addition, the build define we were using was misspelled and therefore not
working anyway, so might we as well remove it now.

MozReview-Commit-ID: 44ERI6TUz1B

--HG--
extra : rebase_source : cdbcf6e20033fd94fb96319c7dc35f4aabce5b3f
This commit is contained in:
Jan Henning 2018-03-27 19:26:04 +02:00
parent 380d398020
commit 8404f212bd

View File

@ -23,12 +23,7 @@ static void DebugDump(const char* fmt, ...)
char buffer[2048];
va_list ap;
va_start(ap, fmt);
#ifdef XPWIN
_vsnprintf(buffer, sizeof(buffer), fmt, ap);
buffer[sizeof(buffer)-1] = '\0';
#else
VsprintfLiteral(buffer, fmt, ap);
#endif
va_end(ap);
#ifdef XP_WIN
if (IsDebuggerPresent()) {