polder@cs.vu.nl (Paul Polderman) (07/31/87)
Sender: Below are fixes for two bugs in `nethack'. bug #1) When nethack asks you what kind of character you want to be, you can also type 'q' and exit. While exitting, nethack forgets to reset your terminal to original state and to remove the lock-files. bug #2) In `pray.c', the author made a mistake and used boolean-OR (||) instead of bitwise-OR (|). --------------------- In `u_init.c' change: 203: if (index("qQ", exper)) exit(0); into: 203: if (index("qQ", exper)) { clearlocks(); settty((char *) 0); exit(0); } --------------------- In `pray.c' change: line 120: if (!(HTelepat & INTRINSIC)) { -> HTelepat = Htelepat || INTRINSIC; pline ("Telepathy,"); } else if (!(Fast & INTRINSIC)) { -> Fast = Fast || INTRINSIC; pline ("Speed,"); } else if (!(Stealth & INTRINSIC)) { -> Stealth = Stealth || INTRINSIC; pline ("Stealth,"); } else { if (!(Protection & INTRINSIC)) { -> Protection = Protection || INTRINSIC; if (!u.ublessed) u.ublessed = rnd(3) + 1; } else u.ublessed++; pline ("our protection,"); } into: line 120: if (!(HTelepat & INTRINSIC)) { -> HTelepat |= INTRINSIC; pline ("Telepathy,"); } else if (!(Fast & INTRINSIC)) { -> Fast |= INTRINSIC; pline ("Speed,"); } else if (!(Stealth & INTRINSIC)) { -> Stealth |= INTRINSIC; pline ("Stealth,"); } else { if (!(Protection & INTRINSIC)) { -> Protection |= INTRINSIC; if (!u.ublessed) u.ublessed = rnd(3) + 1; } else u.ublessed++; pline ("our protection,"); } ------------------ Paul Polderman (polder@cs.vu.nl)