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) {
return parseSection(pos + sectionSize);
} else {
if (sectionCode == 3) {
if (sectionCode == 10) {
lines.setOffset(pos);
}
return skip(sectionSize, "Error skipping section " + sectionCode + " of size " + sectionSize);

View File

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