Commit 1994140f authored by Gerald Pfeifer's avatar Gerald Pfeifer Committed by Alexandre Julliard

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

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