Aih1ap.128 net.games.rogue utcsrgv!utzoo!decvax!ucbvax!mhtsa!ihnss!ihps3!ih1ap!czar Tue Mar 2 13:32:54 1982 Fatal rogue bug There is a fatal bug in rogue which, I'm sure, can occur in all versions. The problem is initiated when a message (usually printed at top of screen) "spills" over to the next line. This can happen, for example, when you pick up a scroll with a horrendously long name. A copy of this message is kept in an 80 character buffer (called "huh") which is used to repeat the message in case you forget or miss it. The problem, simply, is that the saved string is not truncated and winds up overwriting your data area. What happens now varies, and may take a while, but the end result is usually always the same. The next time you pick-up/read/inventory a scroll you might find yourself rudely "kicked" out of the game (no warning or message). Your tty is not set back to original state so you're left naked (raw mode), speech- less (no echo), and defenseless (you're now wielding a keyboard). Although a copy of the game is saved for you, attempts at resuming usually end up the same way. The fatal bug happens when trying to pick-up/read/etc. scrolls in our ver- sion because scroll names are the next thing in the data area after the "huh" array. (Results may vary in other versions depending on how "rogue.h" is layed out). There are a couple of ways to fix the bug. The fixes I used are listed below. The first one is a MUST; the second is optional, but HIGHLY recommended: 1) Limit the amount of characters in scroll names to 40. This is done in "init.c" to the function "init_names()". (The names/descriptions of potions, rings, and staffs aren't long enough to cause problems). 2) Set a limit to strings, in general, via the function "get_str()" in "options.c". This was done because the bug can be induced by someone calling a scroll, potion, etc. by a very long name. There are NO checks in "get_str" for string length or character type. (For a "variation" of the bug, try renaming your fruit type or save file to a string longer than 80 characters) Joe LeClercq (ih1ap!czar) ----------------------------------------------------------------- gopher://quux.org/ conversion by John Goerzen of http://communication.ucsd.edu/A-News/ This Usenet Oldnews Archive article may be copied and distributed freely, provided: 1. There is no money collected for the text(s) of the articles. 2. The following notice remains appended to each copy: The Usenet Oldnews Archive: Compilation Copyright (C) 1981, 1996 Bruce Jones, Henry Spencer, David Wiseman.