Skip to content

Conversation

@Critlist
Copy link
Owner

SAVE FORMAT:
Save version incremented from 1 to 2 for safe pointer serialization

  • Pointers in struct you now serialized as semantic IDs instead of raw memory addresses
  • usick_cause (sickness cause string) saved as object type index or special marker
  • uprops[].p_tofn (timeout function pointers) saved as function IDs
  • Struct dump now zeroes all pointer fields before writing
  • Version 1 saves automatically migrate to Version 2 on load
  • Pre-versioned saves (no magic number) now rejected with clear error message
  • Fixes segfault risk in multi-user server environments (ASLR, process address space changes)

- Introduced version history for save format, supporting versions 1 and 2.
- Implemented safe pointer serialization for multi-user deployment.
- Updated save and restore functions to handle new versioned format.
- Added validation checks for restored data integrity.
@Critlist Critlist merged commit a98fd8b into master Dec 12, 2025
7 checks passed
@Critlist Critlist deleted the savefile-overhaul branch January 11, 2026 00:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants