Skip to content

loadsave.c - cap number of vehicles saved#479

Open
yukichigai wants to merge 8 commits into
dethrace-labs:mainfrom
yukichigai:main
Open

loadsave.c - cap number of vehicles saved#479
yukichigai wants to merge 8 commits into
dethrace-labs:mainfrom
yukichigai:main

Conversation

@yukichigai

Copy link
Copy Markdown

Add a limit of 48 vehicles to save stolen status, as writing more than this will corrupt the save file and cause errors when it is loaded.

Add a limit of 48 vehicles to save stolen status for, as writing more than this will corrupt the save file and cause errors when it is loaded.

@madebr madebr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Forks with incompatible savegames should modify CalcLSChecksum to create guaranteed incompatible savegames.

Comment thread src/DETHRACE/common/loadsave.c Outdated
Co-authored-by: Anonymous Maarten <madebr@users.noreply.github.com>
@yukichigai

Copy link
Copy Markdown
Author

Updated with @madebr 's recommended changes, which make the fix only apply when DETHRACE_FIX_BUGS is defined during compile.

@dethrace-labs dethrace-labs left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@dethrace-labs

Copy link
Copy Markdown
Owner

@madebr are you ok with the latest version of this PR?

@madebr madebr left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To avoid incompatibility with dethrace and/or the original games, please modify CalcLSChecksum to make it incompatible (in your forks).
This can be done easily by changing the initial value of checksum to another non-zero value:

Not sure this is actually needed..

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.

3 participants