]> granicus.if.org Git - nethack/commitdiff
startup menu crash follow up (trunk only)
authornethack.allison <nethack.allison>
Sat, 1 Jul 2006 19:32:27 +0000 (19:32 +0000)
committernethack.allison <nethack.allison>
Sat, 1 Jul 2006 19:32:27 +0000 (19:32 +0000)
Pat:
Either both editions [of bot()] should reset those botl flags
or neither one should.

src/botl.c

index 01e23477ed9bb89bd0bfaad713d17c8308f03005..299e2f4ea85330295c1a1d3efcbe572ce3c49c80 100644 (file)
@@ -611,9 +611,13 @@ bot()
        boolean valset[MAXBLSTATS];
 
        if (!blinit) panic("bot before init.");
-       if (!youmonst.data) return;
+       if (!youmonst.data) {
+               context.botl = context.botlx = 0;
+               update_all = FALSE;
+               return;
+       }
+
        cap = near_capacity();
-       
        idx_p = idx;
        idx   = 1 - idx;        /* 0 -> 1, 1 -> 0 */