1
0
forked from mirrors/0ad

VC fix: mustn't use filename/parent_path instead of leaf/branch_path because those aren't yet available in the version of boost we're currently using.

remove needless restriction on wdbg_printf buffer size
update description of wdbg_printf to match wvsprintfW's real behavior

This was SVN commit r7199.
This commit is contained in:
janwas
2009-11-14 18:32:27 +00:00
parent a444e6febc
commit 78bc63d92c
4 changed files with 9 additions and 13 deletions
+2 -6
View File
@@ -165,18 +165,14 @@ bool debug_filter_allows(const wchar_t* text)
return false;
}
// max # characters (including \0) output by debug_printf in one call.
const size_t DEBUG_PRINTF_MAX_CHARS = 1024; // refer to wdbg.cpp!debug_vsprintf before changing this
#undef debug_printf // allowing #defining it out
void debug_printf(const wchar_t* fmt, ...)
{
wchar_t buf[DEBUG_PRINTF_MAX_CHARS]; buf[ARRAY_SIZE(buf)-1] = '\0';
wchar_t buf[4096];
va_list ap;
va_start(ap, fmt);
const int numChars = vswprintf_s(buf, DEBUG_PRINTF_MAX_CHARS, fmt, ap);
const int numChars = vswprintf_s(buf, ARRAY_SIZE(buf), fmt, ap);
debug_assert(numChars >= 0);
va_end(ap);