Commit ad079d6c authored by Duane Clark's avatar Duane Clark Committed by Alexandre Julliard

Ask for correct number of chars in EditLblWndProcT.

parent 6ec9cc2b
......@@ -9830,14 +9830,14 @@ static LRESULT EditLblWndProcT(HWND hwnd, UINT uMsg,
if (!cancel)
{
DWORD len = 1 + isW ? GetWindowTextLengthW(hwnd) : GetWindowTextLengthA(hwnd);
DWORD len = isW ? GetWindowTextLengthW(hwnd) : GetWindowTextLengthA(hwnd);
if (len)
{
if ( (buffer = COMCTL32_Alloc((len+1) * (isW ? sizeof(WCHAR) : sizeof(CHAR)))) )
{
if (isW) GetWindowTextW(hwnd, buffer, len);
else GetWindowTextA(hwnd, (CHAR*)buffer, len);
if (isW) GetWindowTextW(hwnd, buffer, len+1);
else GetWindowTextA(hwnd, (CHAR*)buffer, len+1);
}
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment