From: Michael Brown Date: Wed, 4 Jul 2012 12:37:08 +0000 (+0100) Subject: [cmdline] Do not ignore empty initial arguments in concat_args() X-Git-Tag: v1.20.1~1727 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f3d197a5296027899f51c1df573e2f8709295d65;p=thirdparty%2Fipxe.git [cmdline] Do not ignore empty initial arguments in concat_args() Reported-by: Oliver Rath Signed-off-by: Michael Brown --- diff --git a/src/core/exec.c b/src/core/exec.c index 49261194d..139cf7a84 100644 --- a/src/core/exec.c +++ b/src/core/exec.c @@ -358,7 +358,7 @@ char * concat_args ( char **args ) { ptr = string; for ( arg = args ; *arg ; arg++ ) { ptr += sprintf ( ptr, "%s%s", - ( ( ptr == string ) ? "" : " " ), *arg ); + ( ( arg == args ) ? "" : " " ), *arg ); } assert ( ptr < ( string + len ) );