wordpad: Check for array index before using it in registry_set_filelist.
This commit is contained in:
parent
00fb860819
commit
1994140f3d
|
@ -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))
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue