diff --git a/doc/fixes34.4 b/doc/fixes34.4 index eac81d007..e3c785195 100644 --- a/doc/fixes34.4 +++ b/doc/fixes34.4 @@ -238,6 +238,8 @@ use alternate phrasing when life drain attack affects non-living creature bypass "wait! there's a creature hidden there" when attacking a hidden monster sensed by ongoing monster detection remove makedefs.c dependency that time_t and long are the same size +terminal window set to 21 lines can cause a crash during player selection + menus; have bot() check for valid youmonst.data Platform- and/or Interface-Specific Fixes diff --git a/src/botl.c b/src/botl.c index 0283858c9..01e23477e 100644 --- a/src/botl.c +++ b/src/botl.c @@ -308,8 +308,10 @@ bot2() void bot() { - bot1(); - bot2(); + if (youmonst.data) { + bot1(); + bot2(); + } context.botl = context.botlx = 0; } @@ -604,11 +606,13 @@ bot() static int idx = 0, idx_p, idxmax; boolean updated = FALSE; unsigned anytype; - int i, pc, chg, cap = near_capacity(); + int i, pc, chg, cap; struct istat_s *curr, *prev; boolean valset[MAXBLSTATS]; if (!blinit) panic("bot before init."); + if (!youmonst.data) return; + cap = near_capacity(); idx_p = idx; idx = 1 - idx; /* 0 -> 1, 1 -> 0 */