From: Gurusamy Sarathy Date: Sat, 24 Apr 1999 17:07:55 +0000 (+0000) Subject: fix bug in change#3123 (off-by-one, caused C to fail X-Git-Url: http://git.shadowcat.co.uk/gitweb/gitweb.cgi?a=commitdiff_plain;h=18a945d476bb4c5319db42e3585c9617c125cba5;p=p5sagit%2Fp5-mst-13.2.git fix bug in change#3123 (off-by-one, caused C to fail on win32) p4raw-link: @3123 on //depot/perl: 0aaad0ff610b01c0682abfc20594c83a6d49f148 p4raw-id: //depot/perl@3269 --- diff --git a/win32/win32.c b/win32/win32.c index 480dfeb..fe621d1 100644 --- a/win32/win32.c +++ b/win32/win32.c @@ -2093,14 +2093,11 @@ create_command_line(const char* command, const char * const *args) New(1310, cmd, len, char); ptr = cmd; strcpy(ptr, command); - ptr += strlen(ptr); - *ptr++ = ' '; for (index = 0; (arg = (char*)args[index]) != NULL; ++index) { - strcpy(ptr, arg); ptr += strlen(ptr); - if ((char*)args[index+1] != NULL) - *ptr++ = ' '; + *ptr++ = ' '; + strcpy(ptr, arg); } return cmd;