From f9e97af1ac986fd43fc37c248e9e7600a9b705a6 Mon Sep 17 00:00:00 2001 From: anders_k Date: Sun, 26 Jun 2016 15:32:44 +0000 Subject: [PATCH] cchTextMax is count of TCHARs including \0 git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6760 212acab6-be3b-0410-9dea-997c60f758d6 --- Source/exehead/Ui.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Source/exehead/Ui.c b/Source/exehead/Ui.c index 0a156b5c..5a021041 100644 --- a/Source/exehead/Ui.c +++ b/Source/exehead/Ui.c @@ -1762,7 +1762,7 @@ static INT_PTR CALLBACK InstProc(HWND hwndDlg, UINT uMsg, WPARAM wParam, LPARAM // 1st pass - determine clipboard memory required. item.iSubItem = 0; item.pszText = g_tmp; - item.cchTextMax = sizeof(g_tmp) - 1; + item.cchTextMax = COUNTOF(g_tmp); i = count; while (i--) // Add 2 for the CR/LF combination that must follow every line.