From 8024fdb625aa1b67ee23fb0740496a4ebf3f380b Mon Sep 17 00:00:00 2001 From: XdotCore Date: Mon, 12 Feb 2024 23:58:33 -0600 Subject: [PATCH] fixed disappearing returns --- UndertaleModLib/Decompiler/Decompiler.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/UndertaleModLib/Decompiler/Decompiler.cs b/UndertaleModLib/Decompiler/Decompiler.cs index 58f6cb6e2..d5aa564b7 100644 --- a/UndertaleModLib/Decompiler/Decompiler.cs +++ b/UndertaleModLib/Decompiler/Decompiler.cs @@ -217,7 +217,7 @@ internal static void DecompileFromBlock(DecompileContext context, Dictionary 0 && nextBlock.Instructions[0].Kind == UndertaleInstruction.Opcode.Push - && nextBlock.Instructions[0].Value.GetType() != typeof(int))) + && nextBlock.Instructions[0].Value is UndertaleInstruction.Reference)) { ReturnStatement stmt = new ReturnStatement(instr.Kind == UndertaleInstruction.Opcode.Ret ? stack.Pop() : null); /*