From c9620d7824e58bdc79a0fde09003ec047b1af3f6 Mon Sep 17 00:00:00 2001 From: Ladislav Zezula Date: Tue, 22 Apr 2025 22:40:25 +0200 Subject: Fixed more bugs from POCs --- test/TLogHelper.cpp | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) (limited to 'test/TLogHelper.cpp') diff --git a/test/TLogHelper.cpp b/test/TLogHelper.cpp index 6eb97f6..ad8a067 100644 --- a/test/TLogHelper.cpp +++ b/test/TLogHelper.cpp @@ -17,6 +17,7 @@ #endif #ifdef _MSC_VER +#define fmt_I64u_w L"%I64u" #define fmt_I64u_t _T("%I64u") #define fmt_I64u_a "%I64u" #define fmt_I64X_t _T("%I64X") @@ -65,25 +66,25 @@ inline DWORD Test_GetLastError() #ifdef STORMLIB_WINDOWS wchar_t * CopyFormatCharacter(wchar_t * szBuffer, const wchar_t *& szFormat) { - static const wchar_t * szStringFormat = _T("%s"); - static const wchar_t * szUint64Format = fmt_I64u_t; + static const wchar_t * szStringFormat = L"%s"; + static const wchar_t * szUint64Format = fmt_I64u_w; // String format if(szFormat[0] == '%') { if(szFormat[1] == 's') { - _tcscpy(szBuffer, szStringFormat); + wcscpy(szBuffer, szStringFormat); szFormat += 2; - return szBuffer + _tcslen(szStringFormat); + return szBuffer + wcslen(szStringFormat); } // Replace %I64u with the proper platform-dependent suffix if(szFormat[1] == 'I' && szFormat[2] == '6' && szFormat[3] == '4' && szFormat[4] == 'u') { - _tcscpy(szBuffer, szUint64Format); + wcscpy(szBuffer, szUint64Format); szFormat += 5; - return szBuffer + _tcslen(szUint64Format); + return szBuffer + wcslen(szUint64Format); } } -- cgit v1.2.3