summaryrefslogtreecommitdiffstats
path: root/adventure/crc.c
diff options
context:
space:
mode:
authordholland <dholland@NetBSD.org>2012-01-07 22:23:16 +0000
committerdholland <dholland@NetBSD.org>2012-01-07 22:23:16 +0000
commitc7181d82c389743f54a91288f6c871b280f1cf71 (patch)
tree3d705f06efad6df144db9867109870700c69376a /adventure/crc.c
parent7af3623528af2b5ce6d4f0a0341cf9e78b5dc28f (diff)
downloadbsdgames-darwin-c7181d82c389743f54a91288f6c871b280f1cf71.tar.gz
bsdgames-darwin-c7181d82c389743f54a91288f6c871b280f1cf71.tar.zst
bsdgames-darwin-c7181d82c389743f54a91288f6c871b280f1cf71.zip
Redo save file handling. The old save files were unportable, had no
magic number or versioning, relied on random(3) never changing to a different implementation, and were also saving pointers to disk and reading them back again. It *looks* as if the pointers thus loaded were reset before being used, but it's not particularly clear as the main loop of this thing is goto-based FORTRAN translated lightly to C. I've changed the logic to null these pointers instead of saving and loading them, and things seem to still work. The new save files have a header, support versioning, write only sized types in network byte order, and for the toy encryption to discourage cheating do something self-contained instead of using random(3) as a stream cipher. Because between the original import from 4.4 until earlier today trying to save would result in SIGSEGV on most platforms, it's unlikely anyone has a save file, but just in case (since the pointer issue appears to be nonlethal) I've kept compat code for old save files.
Diffstat (limited to 'adventure/crc.c')
0 files changed, 0 insertions, 0 deletions