From c4e3799c59c8598333917cc38b34ecb8bca2ffe8 Mon Sep 17 00:00:00 2001 From: Damien Octeau Date: Tue, 15 Oct 2013 00:01:21 -0400 Subject: [PATCH] Fixed a bug where some constants defined with const/high16 were getting inlined with a wrong value. --- dare/decompiler/src/tyde/translator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/dare/decompiler/src/tyde/translator.cpp b/dare/decompiler/src/tyde/translator.cpp index 22babeb274..f3fbf5a8f4 100644 --- a/dare/decompiler/src/tyde/translator.cpp +++ b/dare/decompiler/src/tyde/translator.cpp @@ -414,7 +414,7 @@ void Translator::AddTaoOpcodeAndRef(const TydeInstruction* ins) { || opcode == OP_CONST || opcode == OP_CONST_HIGH16) { if (ins->destination().type.IsIntSubtype()) { s4 constant = (s4) ins->constant(); - if (CanInlineIntegerLiteral(constant)) { + if (opcode != OP_CONST_HIGH16 && CanInlineIntegerLiteral(constant)) { AddIconst((s2) constant); } else { out_ << LDC;