=?UTF-8?Q?Michael=20M=C3=BCller=20?=: user32: Also set cch member in GetMenuItemInfo when passing a null pointer.

Alexandre Julliard julliard at wine.codeweavers.com
Tue Sep 9 14:09:52 CDT 2014


Module: wine
Branch: master
Commit: 997e197f23144fd53af6fceeec471411996ed6a8
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=997e197f23144fd53af6fceeec471411996ed6a8

Author: Michael Müller <michael at fds-team.de>
Date:   Sun Sep  7 20:14:36 2014 +0200

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)




More information about the wine-cvs mailing list