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
1 changed files with 1 additions and 1 deletions

View File

@ -293,7 +293,7 @@ void registry_set_filelist(LPCWSTR newFile, HWND hMainWnd)
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))
{