]> git.pond.sub.org Git - empserver/commitdiff
(execute): Prompted for a missing argument, but then passed a null
authorMarkus Armbruster <armbru@pond.sub.org>
Thu, 15 Nov 2007 19:03:27 +0000 (19:03 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Thu, 15 Nov 2007 19:03:27 +0000 (19:03 +0000)
pointer to prexec() instead.  Some systems (GNU, Windows) deal
gracefully with printing null strings, others crash.

src/lib/player/player.c

index dc919f478f21e0695120ae4e56811f81efde34cf..3b9e789ed44fbb9f7422a06cc811b622f50db7ab 100644 (file)
@@ -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)