mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-13 21:35:39 +00:00
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:
parent
380d398020
commit
8404f212bd
@ -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()) {
|
||||
|
Loading…
Reference in New Issue
Block a user