Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix potential crash after loading of saved game #75

Merged
merged 1 commit into from
Aug 16, 2023

Conversation

alexey-lysiuk
Copy link
Contributor

When number of edicts parsed from saved game is smaller than sv.num_edicts, "old" edicts are not freed nor unlinked while their memory can be reused by newly spawned entities.

This commit fixes #64.

@sezero
Copy link
Owner

sezero commented Aug 14, 2023

@ericwa, @Shpoike, @andrei-drexler?

Quake/host_cmd.c Outdated Show resolved Hide resolved
when number of edicts parsed from saved game is smaller than `sv.num_edicts`, "old" edicts are not freed nor unlinked while their memory can be reused by newly spawned entities
fix sezero#64
matthewearl added a commit to matthewearl/JoeQuake-1 that referenced this pull request Aug 16, 2023
This is a port of alexey.lysiuk's fix for QuakeSpasm:

    5dd8f36a13d4366fff1e64add708d1b77e9ffff3
    sezero/quakespasm#75

Observed by me in ironwail and also JQ reloading a savegame at the start
of e1m6:

    andrei-drexler/ironwail#242
@sezero sezero merged commit 5dd8f36 into sezero:master Aug 16, 2023
6 checks passed
@sezero
Copy link
Owner

sezero commented Aug 16, 2023

This patch is in now. Thanks!

andrei-drexler pushed a commit to andrei-drexler/ironwail that referenced this pull request Nov 18, 2023
When number of edicts parsed from saved game is smaller than `sv.num_edicts`, "old" edicts are not freed nor unlinked while their memory can be reused by newly spawned entities

(adapted from sezero#75)
@alexey-lysiuk alexey-lysiuk deleted the fix_loadgame_crash branch December 8, 2023 10:38
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.

Crash in SV_AreaTriggerEdicts() function
2 participants