Wasm: fix issues in debugger

This commit is contained in:
Alexey Andreev 2022-11-30 13:38:34 +01:00
parent a2715f2c79
commit 4453bba33b
2 changed files with 4 additions and 4 deletions

View File

@ -93,7 +93,7 @@ public class DebugInfoParser {
if (sectionCode == 0) { if (sectionCode == 0) {
return parseSection(pos + sectionSize); return parseSection(pos + sectionSize);
} else { } else {
if (sectionCode == 3) { if (sectionCode == 10) {
lines.setOffset(pos); lines.setOffset(pos);
} }
return skip(sectionSize, "Error skipping section " + sectionCode + " of size " + sectionSize); return skip(sectionSize, "Error skipping section " + sectionCode + " of size " + sectionSize);

View File

@ -39,14 +39,14 @@ public final class CollectionUtil {
if (cmp == 0) { if (cmp == 0) {
return i; return i;
} else if (cmp > 0) { } else if (cmp > 0) {
l = i + i; l = i + 1;
if (l > u) { if (l > u) {
return -i - 1; return -i - 2;
} }
} else { } else {
u = i - 1; u = i - 1;
if (u < l) { if (u < l) {
return -i; return -i - 1;
} }
} }
} }