mirror of
https://github.com/reactos/reactos.git
synced 2025-02-23 17:05:46 +00:00
GetMenuStringA and GetMenuStringW inverted the MF_BYPOSITION parameter. Buffers were incorrectly copied in and wrong size returned in GetMenuItemInfoA ansi-structures.
GetMenuString now works the same on both windows and ROS. svn path=/trunk/; revision=16594
This commit is contained in:
parent
5638b3729f
commit
431d4a6295
1 changed files with 11 additions and 12 deletions
|
@ -3772,7 +3772,7 @@ GetMenuItemInfoA(
|
|||
|
||||
RtlCopyMemory(mii, &miiW, miiW.cbSize);
|
||||
mii->dwTypeData = AnsiBuffer;
|
||||
|
||||
mii->cch = strlen(AnsiBuffer);
|
||||
return TRUE;
|
||||
}
|
||||
|
||||
|
@ -3864,11 +3864,11 @@ GetMenuStringA(
|
|||
MENUITEMINFOA mii;
|
||||
mii.dwTypeData = lpString;
|
||||
mii.fMask = MIIM_STRING;
|
||||
mii.fType = MF_STRING;
|
||||
mii.cbSize = sizeof(MENUITEMINFOA);
|
||||
mii.cch = nMaxCount;
|
||||
|
||||
UNIMPLEMENTED;
|
||||
if(!(GetMenuItemInfoA( hMenu, uIDItem, (BOOL)!(MF_BYPOSITION & uFlag),&mii)))
|
||||
if(!(GetMenuItemInfoA( hMenu, uIDItem, (BOOL)(MF_BYPOSITION & uFlag),&mii)))
|
||||
return 0;
|
||||
else
|
||||
return mii.cch;
|
||||
|
@ -3893,8 +3893,7 @@ GetMenuStringW(
|
|||
miiW.cbSize = sizeof(MENUITEMINFOW);
|
||||
miiW.cch = nMaxCount;
|
||||
|
||||
UNIMPLEMENTED;
|
||||
if(!(GetMenuItemInfoW( hMenu, uIDItem, (BOOL)!(MF_BYPOSITION & uFlag),&miiW)))
|
||||
if(!(GetMenuItemInfoW( hMenu, uIDItem, (BOOL)(MF_BYPOSITION & uFlag),&miiW)))
|
||||
return 0;
|
||||
else
|
||||
return miiW.cch;
|
||||
|
|
Loading…
Reference in a new issue