mirror of
https://github.com/simh/simh.git
synced 2026-02-27 01:00:07 +00:00
Fixed arguments to sprintf when constructing the expansion of %*. Found by Maurizio De Tommaso.
This commit is contained in:
2
scp.c
2
scp.c
@@ -1286,7 +1286,7 @@ for (; *ip && (op < oend); ) {
|
||||
char quote = '"';
|
||||
if (strchr(do_arg[i], quote))
|
||||
quote = '\'';
|
||||
sprintf(&rbuf[strlen(rbuf)], "%s%s\"", (i != 1) ? " " : "", quote, do_arg[i], quote);
|
||||
sprintf(&rbuf[strlen(rbuf)], "%s%s%s%s\"", (i != 1) ? " " : "", quote, do_arg[i], quote);
|
||||
}
|
||||
else
|
||||
sprintf(&rbuf[strlen(rbuf)], "%s%s", (i != 1) ? " " : "", do_arg[i]);
|
||||
|
||||
Reference in New Issue
Block a user