Repository navigation
Conversation
…fines a new locomotor
Walkthrough
ChangesLocomotor reset
Priority: Estimated code review effort: 1 (Trivial) | ~5 minutes Change: Bug fix Suggested reviewers: Merge Risk:
|
[Low impact] The PR appears safe to merge.
|
…otors on reset - A locomotor that a map.ini defines but the loaded INI data lacks becomes an override-only template; LocomotorStore::reset deleted it and erased its node without advancing the iterator, so the loop read the freed node and crashed - Crashed every start of Time To Kill ZH under ContraX Brutal: the incompatible map rollback resets the game data right after map.ini - erase(it++) instead of it = erase(it), so the same fix builds with the STLport of the VC6 build; both trees, sent to TSH as PR TheSuperHackers#3633 - DEBUG_INFO_MAC names every override-only template when map.ini creates it and when the reset erases it
If a map's
map.inidefines a locomotor that the game's INI data does not have, it ends up inm_locomotorTemplatesas an override template. When the game data is reset,LocomotorStore::reset()deletes such a template and its node but does not advance the iterator, so the next iteration crashes on the erased node. The iterator is now advanced before erasing:erase(it++).Reproduction: the map "Time To Kill - ZH - by NeoMaurice" with the ContraX Brutal mod.
Stack trace (macOS, arm64)