Skip to content

Commit

Permalink
Prevent registering backwards compat commands for new spt commands (f…
Browse files Browse the repository at this point in the history
…ixes a BMS crash)
  • Loading branch information
lipsanen committed Sep 21, 2024
1 parent 6290e78 commit 6189b59
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions spt/cvars.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -265,6 +265,11 @@ static void HandleBackwardsCompatibility(FeatureCommand& featCmd, const char* cm
bool allocatedName;
const char* newName = WrangleLegacyCommandName(cmdName, false, &allocatedName);

// Only register spt_ variants for legacy commands, new spt_ commands don't need them
if (newName == cmdName) {
return;
}

// New commands are added to the beginning of the linked list, so it's safe to do this
// while iterating through the list. s_pAccessor needs to be NULL here or else the
// constructor calls below will break the local command list
Expand Down

0 comments on commit 6189b59

Please sign in to comment.