wordpad: Check for array index before using it in registry_set_filelist.

This commit is contained in:
Gerald Pfeifer 2014-11-29 12:59:26 +01:00 committed by Alexandre Julliard
parent 00fb860819
commit 1994140f3d

View file

@ -293,7 +293,7 @@ void registry_set_filelist(LPCWSTR newFile, HWND hMainWnd)
if(lstrcmpiW(newFile, pFiles[0])) if(lstrcmpiW(newFile, pFiles[0]))
{ {
for(i = 0; pFiles[i] && i < FILELIST_ENTRIES; i++) for(i = 0; i < FILELIST_ENTRIES && pFiles[i]; i++)
{ {
if(!lstrcmpiW(pFiles[i], newFile)) if(!lstrcmpiW(pFiles[i], newFile))
{ {