1
0
mirror of https://github.com/fadden/6502bench.git synced 2024-11-29 10:50:28 +00:00

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.
This commit is contained in:
Andy McFadden 2020-04-15 19:23:28 -07:00
parent 6d582c80d3
commit 40b21e2ddb

View File

@ -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;
}