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
This commit is contained in:
anders_k 2016-06-26 15:32:44 +00:00
parent 74255de834
commit f9e97af1ac

View file

@ -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.