mirror of
https://github.com/reactos/reactos.git
synced 2026-05-30 14:34:57 +08:00
[USER32] InternalGetWindowText: Write to caller's buffer only when one was provided. CORE-13614
This commit is contained in:
@@ -1799,7 +1799,7 @@ int WINAPI
|
||||
InternalGetWindowText(HWND hWnd, LPWSTR lpString, int nMaxCount)
|
||||
{
|
||||
INT Ret = NtUserInternalGetWindowText(hWnd, lpString, nMaxCount);
|
||||
if (Ret == 0)
|
||||
if (Ret == 0 && lpString)
|
||||
*lpString = L'\0';
|
||||
return Ret;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user