Source-Changes archive

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

CVS commit: src/games/rogue



Module Name:    src
Committed By:   hgutch
Date:           Mon Apr  7 14:36:28 UTC 2025

Modified Files:
        src/games/rogue: monster.c object.c rogue.h save.c

Log Message:
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.18 src/games/rogue/monster.c
cvs rdiff -u -r1.14 -r1.15 src/games/rogue/object.c src/games/rogue/save.c
cvs rdiff -u -r1.24 -r1.25 src/games/rogue/rogue.h

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