1
0
mirror of https://github.com/sehugg/8bitworkshop.git synced 2025-02-16 17:30:27 +00:00

memory view: fixed memory overflow when using asm symbols

This commit is contained in:
Steven Hugg 2021-05-14 13:21:21 -05:00
parent df742e5297
commit b8d4ab971e

View File

@ -792,7 +792,7 @@ export class MemoryView implements ProjectView {
// TODO: addr2symbol for ca65; and make it work without symbols // TODO: addr2symbol for ca65; and make it work without symbols
getDumpLines() { getDumpLines() {
var addr2sym = (platform.debugSymbols && platform.debugSymbols.addr2symbol) || {}; var addr2sym = (platform.debugSymbols && platform.debugSymbols.addr2symbol) || {};
if (!this.dumplines) { if (this.dumplines == null) {
this.dumplines = []; this.dumplines = [];
var ofs = 0; var ofs = 0;
var sym; var sym;
@ -804,7 +804,7 @@ export class MemoryView implements ProjectView {
if (ignoreSymbol(sym)) { if (ignoreSymbol(sym)) {
sym = ''; sym = '';
} }
while (ofs < nextofs) { while (ofs < nextofs && this.dumplines.length < 0x10000) {
var ofs2 = (ofs + 16) & 0xffff0; var ofs2 = (ofs + 16) & 0xffff0;
if (ofs2 > nextofs) ofs2 = nextofs; if (ofs2 > nextofs) ofs2 = nextofs;
//if (ofs < 1000) console.log(ofs, ofs2, nextofs, sym); //if (ofs < 1000) console.log(ofs, ofs2, nextofs, sym);