summaryrefslogtreecommitdiff
path: root/common_windows.c
diff options
context:
space:
mode:
Diffstat (limited to 'common_windows.c')
-rw-r--r--common_windows.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/common_windows.c b/common_windows.c
index 207b691..9e67a0c 100644
--- a/common_windows.c
+++ b/common_windows.c
@@ -100,7 +100,7 @@ void paintControlBackground(HWND hwnd, HDC dc)
HWND parent;
RECT r;
POINT p, pOrig;
- WCHAR classname[128] = L""; // more than enough to avoid collisions
+ WCHAR classname[maxClassName + 1] = L"";
parent = hwnd;
for (;;) {
@@ -110,7 +110,7 @@ void paintControlBackground(HWND hwnd, HDC dc)
// wine sends these messages early, yay...
if (parent == msgwin)
return;
- if (GetClassNameW(parent, classname, 128) == 0)
+ if (GetClassNameW(parent, classname, maxClassName) == 0)
xpanic("error getting name of focused window class in paintControlBackground()", GetLastError());
// skip groupboxes; they're (supposed to be) transparent
if (_wcsicmp(classname, L"button") != 0)