Forráskód Böngészése

Update astNodes.cpp

strings that are arguments for a function need to be put into the global string table. PrecompileIdent does this for the function name etc so it pulls from that during compiled eval
marauder2k7 1 hete
szülő
commit
3a4e2f8a7e
1 módosított fájl, 2 hozzáadás és 0 törlés
  1. 2 0
      Engine/source/console/torquescript/astNodes.cpp

+ 2 - 0
Engine/source/console/torquescript/astNodes.cpp

@@ -1529,6 +1529,7 @@ U32 FunctionDeclStmtNode::compileStmt(CodeStream& codeStream, U32 ip)
 
    CodeBlock::smInFunction = false;
 
+   setCurrentStringTable(&getGlobalStringTable());
    // check for argument setup
    for (VarNode* walk = args; walk; walk = (VarNode*)((StmtNode*)walk)->getNext())
    {
@@ -1541,6 +1542,7 @@ U32 FunctionDeclStmtNode::compileStmt(CodeStream& codeStream, U32 ip)
          ip = walk->defaultValue->compile(codeStream, ip, walkType);
       }
    }
+   setCurrentStringTable(&getFunctionStringTable());
 
    codeStream.emit(OP_FUNC_DECL);
    codeStream.emitSTE(fnName);