decompiler: map all lines according to bytecode information

This commit is contained in:
Egor.Ushakov
2014-10-15 20:20:44 +04:00
parent 6d03229b91
commit a182de6271
3 changed files with 53 additions and 12 deletions

View File

@@ -54,9 +54,11 @@ public class StructLineNumberTableAttribute extends StructGeneralAttribute {
}
public int findLineNumber(int pc) {
for (int i = 0; i < myLineInfo.length; i += 2) {
if (pc >= myLineInfo[i]) {
return myLineInfo[i + 1];
if (myLineInfo.length >= 2) {
for (int i = myLineInfo.length - 2; i >= 0; i -= 2) {
if (pc >= myLineInfo[i]) {
return myLineInfo[i + 1];
}
}
}
return -1;