From 164f250e5b66876a60030bf8fd6c2fce5b00b8dd Mon Sep 17 00:00:00 2001 From: freenity Date: Sat, 20 Sep 2008 18:37:22 +0000 Subject: [PATCH] This was SVN commit r6406. --- source/lib/debug.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/source/lib/debug.cpp b/source/lib/debug.cpp index 8f133e6239..62361fc342 100644 --- a/source/lib/debug.cpp +++ b/source/lib/debug.cpp @@ -182,10 +182,10 @@ void debug_printf(const wchar_t* fmt, ...) va_end(ap); char buf2[DEBUG_PRINTF_MAX_CHARS]; - size_t bytesWritten; - errno_t ret = wcstombs_s(&bytesWritten, buf2, DEBUG_PRINTF_MAX_CHARS, buf, DEBUG_PRINTF_MAX_CHARS); - debug_assert(ret == 0); - debug_assert(bytesWritten-1 == (size_t)numChars); + + size_t bytesWritten = wcstombs(buf2, buf, DEBUG_PRINTF_MAX_CHARS); + + debug_assert(bytesWritten == (size_t)numChars); if(debug_filter_allows(buf2)) debug_puts(buf2);