From 42b1432b645e1a27810158fba4bd068f4787aa47 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sat, 7 Jan 2017 11:36:57 +0100 Subject: [PATCH] - fixed: initialization of local vector variables did not properly allocate registers if the initializer was a subelement of another local vector variable. --- src/scripting/codegeneration/codegen.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/scripting/codegeneration/codegen.cpp b/src/scripting/codegeneration/codegen.cpp index 7a6997746..d5dbbdbfa 100644 --- a/src/scripting/codegeneration/codegen.cpp +++ b/src/scripting/codegeneration/codegen.cpp @@ -10154,7 +10154,7 @@ ExpEmit FxLocalVariableDeclaration::Emit(VMFunctionBuilder *build) } emitval.Free(build); } - else if (Init->ExprType != EFX_LocalVariable) + else if (!emitval.Fixed) { // take over the register that got allocated while emitting the Init expression. RegNum = emitval.RegNum;