🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: net.games.hack
Article #116

Re: core dump in Hack

#116
From: play
Date: Wed, 23 Jan 1985 14:20
36 lines
1894 bytes
In article <4297@ucbvax.ARPA> grady@ucbvax.ARPA (Steven Grady) writes:
>I got my fdirest core dump from hack
>I was playing as Wizard (not just a wizard, THE wizard) and read
>a scroll of damage weapon while I was confused...
>I haven't checked the source yet, but just thought I'd mention
>it.
>		Steven Grady
>			grady@ucbmiro.Berkeley

Yes, from the source one immediately sees what the problem is:
the codes for ENCHANT_WEAPON and DAMAGE_WEAPON should be exact
analogues, but for some reason the test whether you were wielding
anything got lost under SCR_DAMAGE_WEAPON. Here is the fix.

*** ../Distr_1.0.1/hack.read.c	Mon Jan 21 22:56:19 1985
--- hack.read.c	Wed Jan 23 11:13:35 1985
***************
*** 158,163
  			if(!chwepon(scroll, 1)) return(1);
  		break;
  	case SCR_DAMAGE_WEAPON:
  		if(confused) {
  			pline("Your %s glows purple for a moment.",
  				objects[uwep->otyp].oc_name);

--- 158,167 -----
  			if(!chwepon(scroll, 1)) return(1);
  		break;
  	case SCR_DAMAGE_WEAPON:
+ 		if(!uwep) {
+ 			strange_feeling(scroll);
+ 			return(1);
+ 		}
  		if(confused) {
  			pline("Your %s glows purple for a moment.",
  				objects[uwep->otyp].oc_name);
Technical Details
Message-ID: <242@turing.UUCP>
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!teddy!panda!talcott!harvard!seismo!mcvax!turing!play
References: <4297@ucbvax.ARPA>

Show Full Headers
Complete Article Headers
Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP
Posting-Version: version B 2.10.1 6/24/83 (MC840302); site turing.UUCP
Path: arc1-ca.pugleaf.net!utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!genrad!teddy!panda!talcott!harvard!seismo!mcvax!turing!play
From: play@turing.UUCP
Newsgroups: net.games.hack,net.sources.bugs
Subject: Re: core dump in Hack
Message-ID: <242@turing.UUCP>
Date: Wed, 23-Jan-85 09:20:56 EST
Article-I.D.: turing.242
Posted: Wed Jan 23 09:20:56 1985
Date-Received: Fri, 25-Jan-85 08:06:08 EST
References: <4297@ucbvax.ARPA>
Reply-To: play@turing.UUCP (The MC-funhouse)
Distribution: net
Organization: CWI, Amsterdam
Lines: 38
Apparently-To: rnews@mcvax.LOCAL