Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!utgpu!water!watnot!watmath!clyde!rutgers!seismo!mcvax!ukc!its63b!simon From: simon@its63b.UUCP Newsgroups: comp.sources.d Subject: bug in rogue Message-ID: <314@its63b.ed.ac.uk> Date: Fri, 6-Mar-87 15:46:01 EST Article-I.D.: its63b.314 Posted: Fri Mar 6 15:46:01 1987 Date-Received: Sun, 8-Mar-87 17:31:34 EST Reply-To: simon@its63b.ed.ac.uk (ECSC68 S Brown CS) Organization: I.T. School, Univ. of Edinburgh, U.K. Lines: 43 In the recent posting of rogue, there is a bug in "message.c" which causes it to coredump if you take off your armour. The fix is simple (so I'll just describe it 'nstead of sending a context diff): In print_stats(), the armour-stuff is: if (stat_mask & STAT_ARMOR) { if (label) { mvaddstr(row, 48, "Arm: "); } if (rogue.armor->damage_enchantment > MAX_ARMOR) { rogue.armor->damage_enchantment = MAX_ARMOR; } sprintf(buf, "%d", get_armor_class(rogue.armor)); mvaddstr(row, 53, buf); pad(buf, 2); } while it should be: if (stat_mask & STAT_ARMOR) { if (label) { mvaddstr(row, 48, "Arm: "); } if (rogue.armor && rogue.armor->damage_enchantment > MAX_ARMOR){ rogue.armor->damage_enchantment = MAX_ARMOR; } sprintf(buf, "%d", get_armor_class(rogue.armor)); mvaddstr(row, 53, buf); pad(buf, 2); } I guess this should really be in comp.sources.bugs or comp.sources.games, but I can't post to them! -- ---------------------------------- | Simon Brown | UUCP: seismo!mcvax!ukc!{its63b,cstvax}!simon | Department of Computer Science | JANET: simon@uk.ac.ed.{its63b,cstvax} | University of Edinburgh, | ARPA: simon%{its63b,cstvax}.ed.ac.uk\ | Scotland, UK. | @cs.ucl.ac.uk ---------------------------------- "Life's like that, you know"