]> granicus.if.org Git - nethack/commitdiff
different extended command bit (tty)
authornethack.rankin <nethack.rankin>
Thu, 10 Oct 2002 23:16:02 +0000 (23:16 +0000)
committernethack.rankin <nethack.rankin>
Thu, 10 Oct 2002 23:16:02 +0000 (23:16 +0000)
     I've found myself adding a trailing space to various extend
commands from time to time, and the program fails to recognize then
when that happens.  It might be less likely once none of them has
any embedded spaces, but this wouldn't hurt anything if that becomes
the case.

win/tty/getline.c

index afeeeaabc581f7aacbe438357dab8f6905bfbbf5..7dd3dbf3b2c3bb2099c8cdb59c20d04f6474e222 100644 (file)
@@ -1,4 +1,4 @@
-/*     SCCS Id: @(#)getline.c  3.4     1996/01/27      */
+/*     SCCS Id: @(#)getline.c  3.4     2002/10/06      */
 /* Copyright (c) Stichting Mathematisch Centrum, Amsterdam, 1985. */
 /* NetHack may be freely redistributed.  See license for details. */
 
@@ -214,6 +214,7 @@ tty_get_ext_cmd()
 #else
        hooked_tty_getlin("#", buf, ext_cmd_getlin_hook);
 #endif
+       (void) mungspaces(buf);
        if (buf[0] == 0 || buf[0] == '\033') return -1;
 
        for (i = 0; extcmdlist[i].ef_txt != (char *)0; i++)