[rec.games.hack] Hack polymorph and EMT trap

tgr@picuxa.UUCP (Dr. Emilio Lizardo) (02/10/88)

Perhaps this bug has already been fixed, but I don't recall seeing it:

running Nethack 2.2 on a System V R3 machine (AT&T 3B).  When I 
attempt to polymorph multiple objects, I get an EMT trap.

According to sdb, the following code is at fault:

start at line 619, zap.c --

		/* modified by GAN to hit all objects */
		if(fhito && o_at(bhitpos.x,bhitpos.y)){
			int hitanything = 0;
			for(otmp = fobj; otmp; otmp = otmp->nobj)
				if(otmp->ox == bhitpos.x &&
EXPLODE ===>			   otmp->oy == bhitpos.y)
					hitanything += (*fhito)(otmp, obj);
			if(hitanything)	range--;
		}

Any ideas?  My wonderful documentation doesn't really spell out what
EMT is trapping, although I assume from the code involved that
I'm pointing to a protected area of memory.

As always, thanks in advance.  Please email -- I will post if I
get enough requests.  BTW, please add my vote for a canonical
bugfix posting, oh you net.gods. If possible, context diffs
according to the *original* 2.2 source.
-- 
Tom Gillespie  ( ...ihnp4!picuxa!tgr) | (attmail!tgillespie) (201) 952-1178
AT&T/EDS Product Integration Center  299 Jefferson Rd. Parsippany NJ 07054

"Don't take life so serious ... it ain't nohow permanent."  -- Walt Kelly