]> git.pond.sub.org Git - empserver/commitdiff
(execute): Use player->comtail[1] instead of player->argp[1]. This
authorMarkus Armbruster <armbru@pond.sub.org>
Sun, 25 Nov 2007 14:06:53 +0000 (14:06 +0000)
committerMarkus Armbruster <armbru@pond.sub.org>
Sun, 25 Nov 2007 14:06:53 +0000 (14:06 +0000)
makes execute send everything after the command back to the client
verbatim, not just the first argument (with quotes and funny
characters stripped).  The client always expected that, and got
confused when the server sent something else.

src/lib/player/player.c

index 8d3762c450dd11df0f9744450547cb24eda2c642..89f63a7d0e033d2d606292ab50b297b3147546ae 100644 (file)
@@ -278,8 +278,10 @@ 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 (player->comtail[1])
+       p = player->comtail[1];
+    else
+       p = getstring("File? ", buf);
     if (p == NULL || *p == '\0')
        return RET_SYN;
     prexec(p);