summaryrefslogtreecommitdiff
path: root/protocols/Twitter/Debug.c
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Twitter/Debug.c')
-rw-r--r--protocols/Twitter/Debug.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/protocols/Twitter/Debug.c b/protocols/Twitter/Debug.c
index cfc5c7fd4f..947df7a536 100644
--- a/protocols/Twitter/Debug.c
+++ b/protocols/Twitter/Debug.c
@@ -97,13 +97,11 @@ void _TRACE(LPCSTR fmt, ...)
TCHAR buf[DEBUG_TRACE_BUF_SIZE + 3] = _T("");
va_list va;
-#ifndef UNICODE
- char* tfmt = fmt;
-#else
+
wchar_t tfmt[DEBUG_TRACE_FMT_SIZE];
size_t tmp = 0;
mbstowcs_s(&tmp, tfmt, SIZEOF(tfmt), fmt, _TRUNCATE);
-#endif
+
va_start(va, fmt);
len = _vsntprintf_s(buf, SIZEOF(buf), _TRUNCATE, tfmt, va);