Alexander Nicolaysen Sørnes alex@thehandofagony.com writes:
@@ -590,7 +591,8 @@ static void HandleCommandLine(LPWSTR cmdline) static const WCHAR txtW[] = { '.','t','x','t',0 };
/* try to find file with ".txt" extension */
if (!lstrcmp(txtW, cmdline + lstrlen(cmdline) - lstrlen(txtW)))
if (!lstrcmp(txtW, cmdline + lstrlen(cmdline) - lstrlen(txtW)) ||
strchrW(cmdline, '.'))
There's no point in checking for .txt if any extension will match anyway. Also you should most likely check for a dot only in the filename, not in the whole path.