core dump in Hack
play at turing.UUCP
play at turing.UUCP
Thu Jan 24 00:20:56 AEST 1985
In article <4297 at ucbvax.ARPA> grady at 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 at 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);
More information about the Comp.sources.bugs
mailing list