[comp.sources.games.bugs] Another bug in castle + fix

andrewt@watnow.waterloo.edu (Andrew Thomas) (02/28/90)

When you reach level 21, you get a segmentation fault and the game
hangs.  This is another array too short problem.  Fix this and the
other one  by changing the lines (castle.h:153,154):

char string[9];
int known[20];

to 

char string[32];
int known[40];

Also, in castle.h:88, there is a #define

# define        SAVE_DIR        "/usr/tmp/CASTLE/"

which can be changed to anything you like as a save directory.  You
must give it the trailing slash or it will fail.

The game plays through to completion with these changes on a Sparc.
My only complaint is that copies of magic items have no charges.  That
is, if you find a Fire Staff (or whatever it is) and use it, then all
other Fire Staves in the game have no charges.  Haven't bothered to
track this one down.

Andrew
--

Andrew Thomas
andrewt@watsnew.waterloo.edu	Systems Design Eng.	University of Waterloo
"If a million people do a stupid thing, it's still a stupid thing." - Opus