DIRECTOR: LINGO: Correct codeTheFieldGet to codeTheFieldSet

This commit is contained in:
djsrv 2021-06-21 16:08:26 -04:00 committed by D.J. Servilla
parent 161cf05f7c
commit 597952bdd8

View File

@ -608,10 +608,10 @@ bool LingoCompiler::visitSetNode(SetNode *node) {
FuncNode *func = static_cast<FuncNode *>(the->obj); FuncNode *func = static_cast<FuncNode *>(the->obj);
if (func->args->size() == 1) { if (func->args->size() == 1) {
if (func->name->equalsIgnoreCase("cast")) { if (func->name->equalsIgnoreCase("cast")) {
return codeTheFieldGet(kTheCast, (*func->args)[0], *the->prop); return codeTheFieldSet(kTheCast, (*func->args)[0], *the->prop);
} }
if (func->name->equalsIgnoreCase("field")) { if (func->name->equalsIgnoreCase("field")) {
return codeTheFieldGet(kTheField, (*func->args)[0], *the->prop); return codeTheFieldSet(kTheField, (*func->args)[0], *the->prop);
} }
// window is an object and is handled by that case // window is an object and is handled by that case
} }
@ -642,13 +642,13 @@ bool LingoCompiler::visitSetNode(SetNode *node) {
case kSoundNode: case kSoundNode:
{ {
SoundNode *sound = static_cast<SoundNode *>(the->obj); SoundNode *sound = static_cast<SoundNode *>(the->obj);
return codeTheFieldGet(kTheSoundEntity, sound->arg, *the->prop); return codeTheFieldSet(kTheSoundEntity, sound->arg, *the->prop);
} }
break; break;
case kSpriteNode: case kSpriteNode:
{ {
SpriteNode *sprite = static_cast<SpriteNode *>(the->obj); SpriteNode *sprite = static_cast<SpriteNode *>(the->obj);
return codeTheFieldGet(kTheSprite, sprite->arg, *the->prop); return codeTheFieldSet(kTheSprite, sprite->arg, *the->prop);
} }
break; break;
case kVarNode: case kVarNode: