Author: gadamopoulos
Date: Thu May 18 17:15:22 2017
New Revision: 74579
URL: http://svn.reactos.org/svn/reactos?rev=74579&view=rev
Log:
[UXTHEME] -Apply some suggestions by Thomas.
Modified:
trunk/reactos/dll/win32/uxtheme/nonclient.c
Modified: trunk/reactos/dll/win32/uxtheme/nonclient.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/uxtheme/nonclien…
==============================================================================
--- trunk/reactos/dll/win32/uxtheme/nonclient.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/uxtheme/nonclient.c [iso-8859-1] Thu May 18 17:15:22 2017
@@ -119,11 +119,11 @@
len++; /* From now on this is the size of the buffer so include the null */
- if (len > 50)
- {
- pszText = (WCHAR*)HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
+ if (len > ARRAYSIZE(buffer))
+ {
+ pszText = HeapAlloc(GetProcessHeap(), 0, len * sizeof(WCHAR));
if (!pszText)
- return E_FAIL;
+ return E_OUTOFMEMORY;
}
InternalGetWindowText(pcontext->hWnd, pszText, len);