From 1e82cf877d8fe47cd2376266cbd34a3ab8ad40a3 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Fri, 12 Jun 2020 01:21:29 +0200 Subject: [PATCH] Fix string return value --- src/common/scripting/jit/jit.cpp | 2 +- src/common/scripting/jit/jit_flow.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/common/scripting/jit/jit.cpp b/src/common/scripting/jit/jit.cpp index 6e1b757eca..114ccf23e8 100644 --- a/src/common/scripting/jit/jit.cpp +++ b/src/common/scripting/jit/jit.cpp @@ -27,7 +27,7 @@ JitFuncPtr JitCompile(VMScriptFunction* sfunc) JitCompiler compiler(&context, sfunc); IRFunction* func = compiler.Codegen(); jit->add(&context); - std::string text = context.getFunctionAssembly(func); + //std::string text = context.getFunctionAssembly(func); return reinterpret_cast(jit->getPointerToFunction(func->name)); } catch (...) diff --git a/src/common/scripting/jit/jit_flow.cpp b/src/common/scripting/jit/jit_flow.cpp index fc257a59f5..7e40537c81 100644 --- a/src/common/scripting/jit/jit_flow.cpp +++ b/src/common/scripting/jit/jit_flow.cpp @@ -129,7 +129,7 @@ void JitCompiler::EmitRET() break; case REGT_STRING: { - cc.CreateCall(setReturnString, { location, (regtype & REGT_KONST) ? ConstS(regnum) : LoadS(regnum) }); + cc.CreateCall(setReturnString, { OffsetPtr(ret, retnum * sizeof(VMReturn)), (regtype & REGT_KONST) ? ConstS(regnum) : LoadS(regnum) }); break; } case REGT_POINTER: