From f2123991bdd620957e7acbac30eada1037ae7207 Mon Sep 17 00:00:00 2001 From: NtQuery Date: Thu, 13 Mar 2014 21:21:11 +0100 Subject: [PATCH] unicode bugfixes --- TitanScriptGui/TitanScriptGui.cpp | 31 ++++++++++++++++++++++--------- 1 file changed, 22 insertions(+), 9 deletions(-) diff --git a/TitanScriptGui/TitanScriptGui.cpp b/TitanScriptGui/TitanScriptGui.cpp index 6de0bc7..66fe5a3 100644 --- a/TitanScriptGui/TitanScriptGui.cpp +++ b/TitanScriptGui/TitanScriptGui.cpp @@ -134,29 +134,42 @@ INT_PTR CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) } case IDC_COPY: { //get lines - LRESULT cnt = SendMessage(hLogBox, LB_GETCOUNT, 0, 0); + LRESULT cnt = SendMessageW(hLogBox, LB_GETCOUNT, 0, 0); if (cnt != 0 && cnt != LB_ERR) { - TCHAR buf[MAX_LOG_LINE_LENGTH] = {0}; - TCHAR copy[MAX_LOG_LINE_COUNT*MAX_LOG_LINE_LENGTH*3] = {0}; + WCHAR * copy = 0; + int copyLength = 0; for(LRESULT i=0; i