Article View: net.games.hack
Article #1014Re: Bug in Hack 1.0.3
From: Bryan Bingham
Date: Sat, 31 Aug 1985 15:37
Date: Sat, 31 Aug 1985 15:37
51 lines
2245 bytes
2245 bytes
>
> Hi:
> I found a very annoying little bug in Hack 1.0.3. Ths bug involves the
> 'E' command. When you attempt to write a message with your finger (The E command
> with the '-' option) our Sun 2/170's generate a segmentation fault. Does anybody
> else have this problem with 'E' ???
>
>
> Harry Reed
> {allegra,hplabs,trwrb,ihnp4}!sdcrdcf!doon
Yes, I found it too, it's our Old Friend, a reference to a zero pointer.
You should make several minor changes in hack.engrave.c .
Here is the diff:
142,144c142,147
< if(otmp == &zeroobj)
< otmp = 0;
< if(otmp->otyp == WAN_FIRE && otmp->spe) {
---
> if(otmp == &zeroobj)
> /* Bug in Original? otmp= 0? 28 Aug 1985 b2 */
> otmp = (struct obj *) 0;
> /* BUG in original! Didn't have otmp clause! Bombed on Sun! b2 */
>
> if(otmp && otmp->otyp == WAN_FIRE && otmp->spe) {
190c193,194
< oep = 0;
---
> /* Possible bug! 27 Aug 85 b2 */
> oep = (struct engr *) 0;
272c276,277
< head_engr = 0;
---
> /* Possible Bug! 27 Aug 1985 b2 */
> head_engr = (struct engr *) 0;
278c283,284
< head_engr = 0;
---
> /* Possible Bug! 27 Aug 1985 b2 */
> head_engr = (struct engr *) 0;
This should clear up THAT problem. I wouldn't be suprised to hear
about other instances of exactly the same sort of bug scattered
throughout the code, but I'm just going to fix them as I come across
them. Of course, I won't find any bugs until I'm in a personal best
game, that's almost a law of nature.
b2
ihnp4!bellcore!b2
b2%bellcore@mouton (for ARPA folks)
Technical Details
Message-ID:
<584@magic.UUCP>Path:
arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!petrus!magic!b2References:
<789@udenva.UUCP> <2294@sdcrdcf.UUCP>Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site magic.UUCP Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!gamma!epsilon!zeta!sabre!petrus!magic!b2 From: b2@magic.UUCP (Bryan Bingham) Newsgroups: net.games.hack Subject: Re: Bug in Hack 1.0.3 Message-ID: <584@magic.UUCP> Date: Sat, 31-Aug-85 11:37:25 EDT Article-I.D.: magic.584 Posted: Sat Aug 31 11:37:25 1985 Date-Received: Sun, 1-Sep-85 05:41:59 EDT References: <789@udenva.UUCP> <2294@sdcrdcf.UUCP> Distribution: net Organization: Bell Communications Research, Inc, Morristown, NJ Lines: 51