Link against msvcrt, fixed logic to handle quoted paths in command
line parameters.
This commit is contained in:
parent
fe61065cd7
commit
c74b0989b4
|
@ -4,7 +4,8 @@ SRCDIR = @srcdir@
|
|||
VPATH = @srcdir@
|
||||
MODULE = notepad.exe
|
||||
APPMODE = gui
|
||||
IMPORTS = comdlg32 shell32 user32 gdi32 kernel32
|
||||
IMPORTS = comdlg32 shell32 msvcrt user32 gdi32 kernel32
|
||||
EXTRAINCL = -I$(TOPSRCDIR)/include/msvcrt
|
||||
|
||||
C_SRCS = \
|
||||
License_En.c \
|
||||
|
|
|
@ -221,6 +221,11 @@ void HandleCommandLine(LPSTR cmdline)
|
|||
BOOL file_exists;
|
||||
char buf[MAX_PATH];
|
||||
|
||||
if (cmdline[0] == '"')
|
||||
{
|
||||
cmdline++;
|
||||
cmdline[strlen(cmdline) - 1] = 0;
|
||||
}
|
||||
if (FileExists(cmdline))
|
||||
{
|
||||
file_exists = TRUE;
|
||||
|
|
Loading…
Reference in New Issue