]> granicus.if.org Git - nethack/commitdiff
genocide bit (trunk only)
authornethack.rankin <nethack.rankin>
Tue, 10 Apr 2007 02:27:22 +0000 (02:27 +0000)
committernethack.rankin <nethack.rankin>
Tue, 10 Apr 2007 02:27:22 +0000 (02:27 +0000)
     Simplify a recent change.

src/read.c

index fcf5c3b914295d6616238dfbde49536882cf551e..ef85e13c6f4c094ed39ff041979fcbc3fc9d0ba9 100644 (file)
@@ -1605,10 +1605,9 @@ do_class_genocide()
                    getlin("What class of monsters do you wish to genocide?",
                        buf);
                    (void)mungspaces(buf);
-                   if (*buf == '\033') Strcpy(buf, "none");    /* hangup? */
                } while (!*buf);
                /* choosing "none" preserves genocideless conduct */
-               if (!strcmpi(buf, "none") ||
+               if (*buf == '\033' || !strcmpi(buf, "none") ||
                    !strcmpi(buf, "nothing")) return;
 
                class = name_to_monclass(buf, (int *)0);