Xref: utzoo rec.games.hack:4930 comp.sources.games.bugs:1159 Path: utzoo!attcan!uunet!edsews!rphroy!cfctech!norm From: norm@cfctech.UUCP (Norm Meluch) Newsgroups: rec.games.hack,comp.sources.games.bugs Subject: Re: Nethack crashes after picking character Summary: Short int != signed char Keywords: GEC 63, Sys V, UX63 portable CC Message-ID: <13641@cfctech.UUCP> Date: 22 Aug 89 22:17:23 GMT References: <97@castle.ed.ac.uk> <1021@ks.UUCP> Reply-To: norm@cfctech.UUCP (Norm Meluch) Organization: Chrysler Financial Corp., Troy, MI Lines: 25 >In article <97@castle.ed.ac.uk>, emct35@castle.ed.ac.uk (Jason Smith) writes: > > We can start the program up, it allows us to pick a character, then there is > a dramatic pause, followed by a segmentation (memory) fault. > We had this (and many other problems) with nethack on our 3B2/600. The solution for us was to change the typedef of schar in config.h from signed char to short int. It seems that the room generation functions use the "schar" for a termination flag of the room list for the level, and the termination value for the list is -1. Well on our system signed char is *not* signed, so the search of the list runs off the edge of memory causing the core dump. (This bug took me about 1.5 days to find). After we fixed this problem the program ran fine. - Norm |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Norman J. Meluch ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| | Mail:{sharkey|mailrus}!cfctech!norm Voice: (313) 244-1809 | |~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~| | Note: The opinions expressed here are in no way to be confused with valid | |_______ideas or corporate policy._____________________________________________|