wordpad: Only read up to the maximum number of recent files from the menu.

Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Huw Davies 2016-09-23 12:01:28 +01:00 committed by Alexandre Julliard
parent 7af3f65188
commit 9b701eb7eb
1 changed files with 1 additions and 1 deletions

View File

@ -283,7 +283,7 @@ void registry_set_filelist(LPCWSTR newFile, HWND hMainWnd)
for(i = 0; i < FILELIST_ENTRIES; i++) for(i = 0; i < FILELIST_ENTRIES; i++)
pFiles[i] = NULL; pFiles[i] = NULL;
for(i = 0; GetMenuItemInfoW(hMenu, ID_FILE_RECENT1+i, FALSE, &mi); i++) for(i = 0; i < FILELIST_ENTRIES && GetMenuItemInfoW(hMenu, ID_FILE_RECENT1+i, FALSE, &mi); i++)
pFiles[i] = (LPWSTR)mi.dwItemData; pFiles[i] = (LPWSTR)mi.dwItemData;
if(lstrcmpiW(newFile, pFiles[0])) if(lstrcmpiW(newFile, pFiles[0]))