mirror of
https://github.com/reactos/reactos.git
synced 2024-10-02 07:26:47 +00:00
[UXTHEME] -Apply some suggestions by Thomas.
svn path=/trunk/; revision=74579
This commit is contained in:
parent
a1a782be93
commit
313744b524
|
@ -119,11 +119,11 @@ HRESULT WINAPI ThemeDrawCaptionText(PDRAW_CONTEXT pcontext, RECT* pRect, int iPa
|
|||
|
||||
len++; /* From now on this is the size of the buffer so include the null */
|
||||
|
||||
if (len > 50)
|
||||
if (len > ARRAYSIZE(buffer))
|
||||
{
|
||||
pszText = (WCHAR*)HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
|
||||
pszText = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
|
||||
if (!pszText)
|
||||
return E_FAIL;
|
||||
return E_OUTOFMEMORY;
|
||||
}
|
||||
|
||||
InternalGetWindowText(pcontext->hWnd, pszText, len);
|
||||
|
|
Loading…
Reference in a new issue