Skip to content
This repository has been archived by the owner on Apr 20, 2018. It is now read-only.

Fix typos in symbol lookups #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions smxdasm/Sections.cs
Original file line number Diff line number Diff line change
Expand Up @@ -516,7 +516,7 @@ public DebugSymbolEntry FindFunction(int address)
{
if (entry.Ident != SymKind.Function)
continue;
if (address >= entry.Address && address <= entry.Address)
if (address >= entry.CodeStart && address <= entry.CodeEnd)
return entry;
}
return null;
Expand Down Expand Up @@ -556,7 +556,7 @@ public DebugSymbolEntry FindStackRef(int codeaddr, int stackaddr)
if (i == symbols.Count - 1)
break;

var next_sym = symbols[i];
var next_sym = symbols[i + 1];

// Only arrays can be accessed out of their starting address.
if (sym.Ident != SymKind.Array)
Expand Down Expand Up @@ -586,7 +586,7 @@ public DebugSymbolEntry FindDataRef(int address)
if (sym.Ident != SymKind.Array)
continue;

var next_sym = dat_refs_[i];
var next_sym = dat_refs_[i + 1];
if (address > sym.Address && address < next_sym.Address)
return sym;
}
Expand Down