Skip to content

Commit

Permalink
fix(zscript): Trace(string) using wrong register
Browse files Browse the repository at this point in the history
  • Loading branch information
connorjclark committed Apr 17, 2024
1 parent 40537d3 commit d845df6
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/parser/symbols/GlobalSymbols.cpp
Expand Up @@ -495,7 +495,7 @@ void GlobalSymbols::generateCode()
Function* function = getFunction("TraceS");
int32_t label = function->getLabel();
vector<shared_ptr<Opcode>> code;
addOpcode2 (code, new OPopRegister(new VarArgument(INDEX)));
addOpcode2 (code, new OPopRegister(new VarArgument(EXP2)));
LABELBACK(label);
addOpcode2 (code, new OTrace6Register(new VarArgument(EXP2)));
RETURN();
Expand Down
2 changes: 1 addition & 1 deletion tests/scripts/armos_expected.txt
Expand Up @@ -13818,7 +13818,7 @@ ALLOCATEMEMV d2,43
STORED d2,0
WRITEPODSTRING d2,"ghost.zh: Failed to find prototype eweapon"
LOADD d2,0
SETR d0,d2
SETR d3,d2
TRACE6 d3
TRACE3
SETV d2,0
Expand Down

0 comments on commit d845df6

Please sign in to comment.