diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 76d61ab1b..e3a4257dd 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,3 +1,8 @@ +2013-07-19 Christopher Faylor + + * lib/libcmain.c (main): Don't point to last quoted character if the + only thing in the buffer is the program name. + 2013-07-19 Christopher Faylor * common.din: Export GetCommandLine{A,W}. diff --git a/winsup/cygwin/lib/libcmain.c b/winsup/cygwin/lib/libcmain.c index bf6d980fc..73c698d31 100644 --- a/winsup/cygwin/lib/libcmain.c +++ b/winsup/cygwin/lib/libcmain.c @@ -31,8 +31,8 @@ main () if (!nexts) nexts = strchr (s, '\0'); - else - nexts += strspn (nexts + 1, SP); + else if (*++nexts) + nexts += strspn (nexts, SP); GetStartupInfo (&si);