diff --git a/NESDecompiler.Core/Decompilation/FunctionDecompiler.cs b/NESDecompiler.Core/Decompilation/FunctionDecompiler.cs index faab97b..160a4fb 100644 --- a/NESDecompiler.Core/Decompilation/FunctionDecompiler.cs +++ b/NESDecompiler.Core/Decompilation/FunctionDecompiler.cs @@ -104,7 +104,7 @@ public static DecompiledFunction Decompile(ushort functionAddress, IReadOnlyList private static DisassembledInstruction? GetNextInstruction(ushort address, IReadOnlyList regions) { var relevantRegion = regions - .Where(x => x.BaseAddress < address) + .Where(x => x.BaseAddress <= address) .Where(x => x.BaseAddress + x.Bytes.Length > address) .FirstOrDefault();