[comp.sources.bugs] Nethack 1.4f bug

brianc@cognos.uucp (Brian Campbell) (08/25/87)

   Here's a fix for a small bug introduced in the 1.4f version of
Nethack.  An additional parameter was added to enexto() that was not
reflected in shk.c (core dump if you try to steal from a shop).

*** shk.orig	Mon Aug 24 17:48:21 1987
--- shk.c	Mon Aug 24 17:42:06 1987
***************
*** 172,178 ****
  			    mm.x = xdnstair;
  			    mm.y = ydnstair;
  			    while(cnt--) {
! 				    mm = enexto(mm.x, mm.y);
  				    (void) mkmon_at('K', mm.x, mm.y);
  			    }
  			    /* Create a swarm near the shopkeeper */
--- 172,178 ----
  			    mm.x = xdnstair;
  			    mm.y = ydnstair;
  			    while(cnt--) {
! 				    enexto(&mm, mm.x, mm.y);
  				    (void) mkmon_at('K', mm.x, mm.y);
  			    }
  			    /* Create a swarm near the shopkeeper */
***************
*** 180,186 ****
  			    mm.x = shopkeeper->mx;
  			    mm.y = shopkeeper->my;
  			    while(cnt--) {
! 				    mm = enexto(mm.x, mm.y);
  				    (void) mkmon_at('K', mm.x, mm.y);
  			    }
  			}
--- 180,186 ----
  			    mm.x = shopkeeper->mx;
  			    mm.y = shopkeeper->my;
  			    while(cnt--) {
! 				    enexto(&mm, mm.x, mm.y);
  				    (void) mkmon_at('K', mm.x, mm.y);
  			    }
  			}
-- 
Brian Campbell          uucp: decvax!utzoo!dciem!nrcaer!cognos!brianc
Cognos Incorporated     mail: 3755 Riverside Drive, Ottawa, Ontario, K1G 3N3
(613) 738-1440          fido: sysop@163/8