Source-Changes archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

CVS commit: [netbsd-10] src/games/rogue



Module Name:    src
Committed By:   martin
Date:           Sat Apr 12 12:09:56 UTC 2025

Modified Files:
        src/games/rogue [netbsd-10]: monster.c object.c play.c rogue.h save.c

Log Message:
Pull up following revision(s) (requested by hgutch in ticket #1090):

        games/rogue/rogue.h: revision 1.25
        games/rogue/play.c: revision 1.11
        games/rogue/monster.c: revision 1.18
        games/rogue/save.c: revision 1.15
        games/rogue/object.c: revision 1.15

Fix segfault when canceling "Quit" operation

When pressing 'Q' followed by anything other than 'y', make sure not to
end up calling __unreachable().
Pointed out by Anthony C Howe <achowe%snert.com@localhost>

Fix loading save files

Both monster and weapon damage are represented as strings like "1d1", and
internally the game keeps track of them as pointers to static strings
in memory.  When saving, the game saves these pointers and when loading
them the pointers end up being identical to before - which now points to
undefined memory.

So when loading a save game, reset the damage strings based on the type
of monster or weapon.

Pointed out and fix suggested by Anthony C Howe <achowe%snert.com@localhost>
(committed with a small modification of said patch).


To generate a diff of this commit:
cvs rdiff -u -r1.17 -r1.17.36.1 src/games/rogue/monster.c
cvs rdiff -u -r1.14 -r1.14.56.1 src/games/rogue/object.c
cvs rdiff -u -r1.10 -r1.10.10.1 src/games/rogue/play.c
cvs rdiff -u -r1.24 -r1.24.36.1 src/games/rogue/rogue.h
cvs rdiff -u -r1.14 -r1.14.6.1 src/games/rogue/save.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.




Home | Main Index | Thread Index | Old Index