Skip to content

Commit

Permalink
Fixes a potential out-of-bounds reference to aVariables.Booleans now …
Browse files Browse the repository at this point in the history
…that it's a Vector; initial load-in animation variables might be empty.
  • Loading branch information
rfortier committed May 8, 2024
1 parent 480e299 commit ef840be
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Code/client/Games/References.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ void TESObjectREFR::LoadAnimationVariables(const AnimationVariables& aVariables)

if (pVariableSet->size > idx)
{
pVariableSet->data[idx] = aVariables.Booleans[i];
pVariableSet->data[idx] = aVariables.Booleans.size() > i ? aVariables.Booleans[i] : false;
}
}

Expand Down

0 comments on commit ef840be

Please sign in to comment.