Browse Source

[cmdline] Do not ignore empty initial arguments in concat_args()

Reported-by: Oliver Rath <rath@mglug.de>
Signed-off-by: Michael Brown <mcb30@ipxe.org>
tags/v1.20.1
Michael Brown 12 years ago
parent
commit
f3d197a529
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      src/core/exec.c

+ 1
- 1
src/core/exec.c View File

@@ -358,7 +358,7 @@ char * concat_args ( char **args ) {
358 358
 	ptr = string;
359 359
 	for ( arg = args ; *arg ; arg++ ) {
360 360
 		ptr += sprintf ( ptr, "%s%s",
361
-				 ( ( ptr == string ) ? "" : " " ), *arg );
361
+				 ( ( arg == args ) ? "" : " " ), *arg );
362 362
 	}
363 363
 	assert ( ptr < ( string + len ) );
364 364
 

Loading…
Cancel
Save