Skip to content

Commit

Permalink
Merge pull request #1681 from XdotCore/fix-disappearing-returns-v2
Browse files Browse the repository at this point in the history
fixed disappearing returns
  • Loading branch information
colinator27 authored Mar 4, 2024
2 parents c58373a + 8024fdb commit 58ac6d4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion UndertaleModLib/Decompiler/Decompiler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,7 @@ internal static void DecompileFromBlock(DecompileContext context, Dictionary<uin
if (!(nextBlock is not null
&& nextBlock.Instructions.Count > 0
&& nextBlock.Instructions[0].Kind == UndertaleInstruction.Opcode.Push
&& nextBlock.Instructions[0].Value.GetType() != typeof(int)))
&& nextBlock.Instructions[0].Value is UndertaleInstruction.Reference<UndertaleFunction>))
{
ReturnStatement stmt = new ReturnStatement(instr.Kind == UndertaleInstruction.Opcode.Ret ? stack.Pop() : null);
/*
Expand Down

0 comments on commit 58ac6d4

Please sign in to comment.