mirror of
https://github.com/revanced/smali.git
synced 2025-05-11 11:54:29 +02:00
Fixed an issue when generating try items at the very end of a method
git-svn-id: https://smali.googlecode.com/svn/trunk@185 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
parent
d58edc94c0
commit
d7df5938b1
@ -393,7 +393,17 @@ public class MethodDefinition {
|
||||
}
|
||||
//index should never by 0, so this should be safe
|
||||
if (index == instructions.size()) {
|
||||
index--;
|
||||
//if the end address is the same as the address of the last instruction, then
|
||||
//this try item ends at the next to last instruction.
|
||||
//otherwise, if the end address is past the address of the last instruction,
|
||||
//thin this try item ends at the last instruction
|
||||
if (instructions.get(instructions.size() - 1).getOffset() == endAddress) {
|
||||
//get the address for the next to last instruction
|
||||
index -= 2;
|
||||
} else {
|
||||
//get the address for the last instruction
|
||||
index--;
|
||||
}
|
||||
} else {
|
||||
index -= 2;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user