Commit 9b701eb7 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

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

parent 7af3f651
......@@ -283,7 +283,7 @@ void registry_set_filelist(LPCWSTR newFile, HWND hMainWnd)
for(i = 0; i < FILELIST_ENTRIES; i++)
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;
if(lstrcmpiW(newFile, pFiles[0]))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment