[rec.games.hack] Amiga NetHack 3.0j PL10 Bug and Fix

keni@dtix.dt.navy.mil (Kenneth Lorber) (04/23/91)

This is an unofficial patch for Amiga NetHack 3.0j, Patchlevel 10.  This is
not an official patch because all official work on 3.0 has ceased.

The bug:
Saving when in the endgame fails (thanks go to Dominik Zemmler for the bug
report).

The source fix:
In save.c, change
	struct finfo fileinfo[MAXLEVEL+1];
to
	struct finfo fileinfo[MAXLEVEL+2];

The binary fix:
If you are using the "official" binaries posted earlier this year (and also
available at various archives and on a Fish Disk), the following program
will correct the problem (for those of you who dislike running random binaries,
the incredibly ugly source will be submitted to comp.binaries.amiga and the
binary will be available from linc.cis.upenn.edu).  To apply the fix,
uudecode the program that appears below (it's called bdiffa) and run it:
it will examine the file HackExe:NetHack and, if it appears to be the right
version, will apply the patch.  If all goes well, the output will be:
	Checking
	Patching
	Done
Error messages will appear if something goes wrong.  Just in case, please
MAKE A BACKUP OF HACKEXE:NETHACK BEFORE APPLYING THE PATCH!

Please pass this patch on to anyone playing this version of Amiga NetHack.
As usual, bug reports should be sent to nethack-bugs@linc.cis.upenn.edu.
My apologies for posting code in non-traditional places.

Share and Enjoy,
Ken Lorber
keni@dtix.dt.navy.mil
for the Amiga NetHack Team

begin 644 bdiffa
M```#\P`````````#``````````(```"B````MP```54```/I````HDCG?OXD
M2"0`2?D`````+'@`!$?Y```$X'(`(#P````=8`(FP5'(__PI3P4@*4X%&$*L
M!1QP`"(\```P`$ZN_LY#^@&4<`!.KOW8*4`%4&8&<&1@``$F)FX!%"EK`)@%
M%$JK`*QG``"2(`^0KP`X!H````"`*4`$Y"!K`*S1R-'((F@`$-/)T\D@`G(`
M$ADI204HT(%>@`)`__PI0`4P2.=`0"(\``$``4ZN_SI*@&8,(#P```/H+P!G
M``$0($`I0`4L3-\"`B`"4X#4@1&R```@`E."4<C_]A&\`"`@`E."$;P`(B`"
M$;$@`"`!4<K_^!"\`"(O"&!R*6L`.@3D<']2@-&L!.1!ZP!<3J[^@$'K`%Q.
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V02`W-@``4S`P,#`P,#4Y`%(V02`W-@``4S`P
M,#`P-S,W`%(Y0R`Y1@``4S`P,#%%1#0T`%(T-B`T,0``4C8U(#<P``!2-C(@
M-S(``%,P,#`P,#`P,0!2,S`@,S$``%(S-B`S-P``4S`P,#`P,#`Q`%(S,2`S
M,@``4C,W(#,P``!3,#`P,#`P,#$`4C,S(#,U``!2,S0@,S@``%,P,#`P,#`P
M,0!2,S$@,S```%(S,R`S,0``4S`P,#`P,#`W`%(R-R`R.```4D(P(#!$``!2
M.3(@,$(``%(W-2`S.0``````````````"@```!(````<````)````"X````V
M````0````$@```!2````6@```&0```!L````=@```'X```"(````D````)H`
M``"B````K````+0```"^````Q@```-````#8````X@```.H```#T````_```
M`08```$.```!&````2````$J```!,@```3P```%$```!3@```58```%@```!
M:````7(```%Z```!A````8P```&6```!G@```:@```&P```!N@```<(```',
M```!U````=P```'D```![@```?8```'^```""````A````(8```"(@```BH`
M``(R```"/````D0```),```"5@```EX```)F```";@```G8`````"@!(86-K
M17AE.DYE=$AA8VL`0VAE8VMI;F<*`$-H96-K:6YG"@!0871C:&EN9PH`4&%T
M8VAI;F<*`$1O;F4*`$1O;F4*`$AA8VM%>&4Z3F5T2&%C:R!F86EL960@;6%T
M8V@Z(&=O="```$AA8VM%>&4Z3F5T2&%C:R!F86EL960@;6%T8V@Z(&=O="``
M`"P@97AP96-T960@`"P@97AP96-T960@`'!A=&-H('!R;V=R86T@8V]R<G5P
M="$*`'!A=&-H('!R;V=R86T@8V]R<G5P="$*`$AA8VM%>&4Z3F5T2&%C:R!M
M87D@8F4@8V]R<G5P="$*``!(86-K17AE.DYE=$AA8VL@;6%Y(&)E(&-O<G)U
M<'0A"@``22]/(&5R<F]R"@``22]/(&5R<F]R"@`P,3(S-#4V-S@Y04)#1$5&
M```````#[````$@````"```#E````Y````.,```#B````X0```.````#?```
M`W@```-T```#<````VP```-H```#9````V````-<```#6````U0```-0```#
M3````T@```-$```#0````SP```,X```#-````S````,L```#*````R0```,@
M```#'````Q@```,4```#$````PP```,(```#!````P````+\```"^````O0`
M``+P```"[````N@```+D```"X````MP```+8```"U````M````+,```"R```
M`L0```+````"O````K@```*T```"L````JP```*H```"I````J````*<```"
IF````I0```*0```"C````H@```*$```"@````GP```)X`````````_*<
`
end

[If you can read this line, thank the line-eater.]