Files
wine-staging/patches/user32-GetMenuItemInfo/0001-user32-Also-set-cch-member-in-GetMenuItemInfo-when-p.patch
2014-09-07 20:26:44 +02:00

32 lines
1.0 KiB
Diff

From c91c8456d92e0761f0b6df345c4547b54db63d86 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
Date: Sun, 7 Sep 2014 20:14:36 +0200
Subject: user32: Also set cch member in GetMenuItemInfo when passing a null
pointer.
---
dlls/user32/menu.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/user32/menu.c b/dlls/user32/menu.c
index 93bee49..9e05dd4 100644
--- a/dlls/user32/menu.c
+++ b/dlls/user32/menu.c
@@ -4583,12 +4583,12 @@ static BOOL GetMenuItemInfo_common ( HMENU hmenu, UINT item, BOOL bypos,
if ((lpmii->fMask & (MIIM_TYPE|MIIM_STRING))) {
if( !menu->text ) {
if(lpmii->dwTypeData && lpmii->cch) {
- lpmii->cch = 0;
if( unicode)
*((WCHAR *)lpmii->dwTypeData) = 0;
else
*((CHAR *)lpmii->dwTypeData) = 0;
}
+ lpmii->cch = 0;
} else {
int len;
if (unicode)
--
1.9.1