decompiler: map all lines according to bytecode information
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user