Skip to content
Snippets Groups Projects
Commit 0ca58612 authored by André Zwing's avatar André Zwing Committed by Alexandre Julliard
Browse files

view: Buffer size of GetFileTitleW is in characters, not bytes (coverity).

parent 9d6c003c
No related branches found
No related tags found
No related merge requests found
......@@ -260,7 +260,7 @@ static LRESULT CALLBACK WndProc(HWND hwnd, UINT uMessage, WPARAM wparam, LPARAM
if (FileOpen(hwnd, filename, sizeof(filename)/sizeof(WCHAR)))
{
szFileTitle[0] = 0;
GetFileTitleW(filename, szFileTitle, sizeof(szFileTitle));
GetFileTitleW(filename, szFileTitle, sizeof(szFileTitle)/sizeof(WCHAR));
DoOpenFile(filename);
UpdateWindowCaption();
}
......@@ -387,7 +387,7 @@ static void HandleCommandLine(LPWSTR cmdline)
cmdline[lstrlenW(cmdline) - 1] = 0;
}
szFileTitle[0] = 0;
GetFileTitleW(cmdline, szFileTitle, sizeof(szFileTitle));
GetFileTitleW(cmdline, szFileTitle, sizeof(szFileTitle)/sizeof(WCHAR));
DoOpenFile(cmdline);
UpdateWindowCaption();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment