From 40b21e2ddb1f0475afed91c5b90ec815e22c3f62 Mon Sep 17 00:00:00 2001 From: Andy McFadden Date: Wed, 15 Apr 2020 19:23:28 -0700 Subject: [PATCH] Fix range check in local variable table lookup Double-clicking on the opcode of an instruction that referenced a local variable would fail to jump if the LvTable was defined at file offset 0. --- SourceGen/MainController.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SourceGen/MainController.cs b/SourceGen/MainController.cs index f005e1c..bc094b1 100644 --- a/SourceGen/MainController.cs +++ b/SourceGen/MainController.cs @@ -2708,7 +2708,7 @@ namespace SourceGen { LocalVariableLookup lvLookup = new LocalVariableLookup(mProject.LvTables, mProject, null, false, false); int varOffset = lvLookup.GetDefiningTableOffset(offset, symRef); - if (varOffset <= 0) { + if (varOffset < 0) { Debug.WriteLine("Local variable not found; offset=" + offset + " ref=" + symRef); return; }