(execute): Prompted for a missing argument, but then passed a null
pointer to prexec() instead. Some systems (GNU, Windows) deal gracefully with printing null strings, others crash.
This commit is contained in:
parent
a877480082
commit
bd0d5c10b6
1 changed files with 2 additions and 4 deletions
|
@ -278,13 +278,11 @@ execute(void)
|
|||
failed = 0;
|
||||
redir = NULL;
|
||||
|
||||
/* FIXME should use raw argument here, to support UTF-8 file names */
|
||||
p = getstarg(player->argp[1], "File? ", buf);
|
||||
|
||||
if (p == NULL || *p == '\0')
|
||||
return RET_SYN;
|
||||
|
||||
/* FIXME should use raw argument here, to support UTF-8 file names */
|
||||
prexec(player->argp[1]);
|
||||
prexec(p);
|
||||
|
||||
while (!failed && status()) {
|
||||
if (recvclient(buf, sizeof(buf)) < 0)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue