mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-02-12 19:31:41 +00:00
TScript Bugfix
If the statement is a terminating statement on slot assignment (such as %var[%i]++;), the stack has to be popped everytime slot arrays are used regardless of the expression type.
This commit is contained in:
parent
3d4b7b469c
commit
0d743c8bb9
2 changed files with 109 additions and 1 deletions
|
|
@ -1370,7 +1370,7 @@ U32 SlotAssignOpNode::compile(CodeStream& codeStream, U32 ip, TypeReq type)
|
|||
if (arrayExpr)
|
||||
{
|
||||
codeStream.emit(OP_SETCURFIELD_ARRAY);
|
||||
if (subType == TypeReqNone)
|
||||
if (subType == TypeReqNone || type == TypeReqNone)
|
||||
codeStream.emit(OP_POP_STK);
|
||||
}
|
||||
codeStream.emit((subType == TypeReqFloat) ? OP_LOADFIELD_FLT : OP_LOADFIELD_UINT);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue