mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-07-14 08:04:40 +00:00
fix arg corruption on functioncall compilation.
This commit is contained in:
parent
b05691c6b5
commit
449c4c4d1e
1 changed files with 4 additions and 2 deletions
|
|
@ -1402,6 +1402,8 @@ U32 FuncCallExprNode::compile(CodeStream &codeStream, U32 ip, TypeReq type)
|
||||||
|
|
||||||
bool isThisCall = false;
|
bool isThisCall = false;
|
||||||
|
|
||||||
|
ExprNode *walk = args;
|
||||||
|
|
||||||
// Try to optimize the this pointer call if it is a variable
|
// Try to optimize the this pointer call if it is a variable
|
||||||
// that we are loading.
|
// that we are loading.
|
||||||
if (callType == MethodCall)
|
if (callType == MethodCall)
|
||||||
|
|
@ -1420,11 +1422,11 @@ U32 FuncCallExprNode::compile(CodeStream &codeStream, U32 ip, TypeReq type)
|
||||||
codeStream.emitSTE(var->varName);
|
codeStream.emitSTE(var->varName);
|
||||||
|
|
||||||
// inc args since we took care of first arg.
|
// inc args since we took care of first arg.
|
||||||
args = static_cast<ExprNode*>(args->getNext());
|
walk = (ExprNode*)walk ->getNext();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
for (ExprNode *walk = args; walk; walk = (ExprNode *)walk->getNext())
|
for (; walk; walk = (ExprNode *)walk->getNext())
|
||||||
{
|
{
|
||||||
TypeReq walkType = walk->getPreferredType();
|
TypeReq walkType = walk->getPreferredType();
|
||||||
if (walkType == TypeReqNone) walkType = TypeReqString;
|
if (walkType == TypeReqNone) walkType = TypeReqString;
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue