diff options
author | Christopher Faylor <me@cgf.cx> | 2013-07-19 19:04:13 +0000 |
---|---|---|
committer | Christopher Faylor <me@cgf.cx> | 2013-07-19 19:04:13 +0000 |
commit | 132e0f018226396c89ceb8d02c6bb72454c2699c (patch) | |
tree | c4396d562eaa8b0ce987b8c1c1f9378a6e1b8ece | |
parent | 4741932459337c358fb1f11df3707fcdd54916aa (diff) | |
download | cygnal-132e0f018226396c89ceb8d02c6bb72454c2699c.tar.gz cygnal-132e0f018226396c89ceb8d02c6bb72454c2699c.tar.bz2 cygnal-132e0f018226396c89ceb8d02c6bb72454c2699c.zip |
* lib/libcmain.c (main): Don't point to last quoted character if the only thing
in the buffer is the program name.
-rw-r--r-- | winsup/cygwin/ChangeLog | 5 | ||||
-rw-r--r-- | winsup/cygwin/lib/libcmain.c | 4 |
2 files changed, 7 insertions, 2 deletions
diff --git a/winsup/cygwin/ChangeLog b/winsup/cygwin/ChangeLog index 76d61ab1b..e3a4257dd 100644 --- a/winsup/cygwin/ChangeLog +++ b/winsup/cygwin/ChangeLog @@ -1,5 +1,10 @@ 2013-07-19 Christopher Faylor <me.cygwin2013@cgf.cx> + * 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 <me.cygwin2013@cgf.cx> + * common.din: Export GetCommandLine{A,W}. * kernel32.cc: Add includes needed for GetCommandLine functions. (ucmd): New function. 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); |