Fix if to else if regression.

This commit is contained in:
Jeff Hutchinson 2021-09-04 16:23:20 -04:00
parent 313c069ecb
commit 278bef8d1a
2 changed files with 24 additions and 1 deletions

View file

@ -226,7 +226,7 @@ static void setFieldComponent(SimObject* object, StringTableEntry field, const c
if (object && field)
prevVal = object->getDataField(field, array);
if (currentLocalRegister != -1)
else if (currentLocalRegister != -1)
prevVal = gEvalState.getLocalStringVariable(currentLocalRegister);
// Set the value on a variable.
else if (gEvalState.currentVariable)