mirror of
https://github.com/revanced/smali.git
synced 2025-05-28 11:50:12 +02:00
Fixed size calculation in placeItem
git-svn-id: https://smali.googlecode.com/svn/trunk@380 55b6fa8a-2a1e-11de-a435-ffa8d773f76a
This commit is contained in:
parent
14f02f4884
commit
d269393753
@ -169,14 +169,15 @@ public class CodeItem extends Item<CodeItem> {
|
||||
protected int placeItem(int offset) {
|
||||
offset += 16 + encodedInstructions.length;
|
||||
if (tries != null && tries.length > 0) {
|
||||
if (encodedInstructions.length % 2 == 1) {
|
||||
offset++;
|
||||
if (encodedInstructions.length % 4 != 0) {
|
||||
offset+=2;
|
||||
}
|
||||
|
||||
offset += tries.length * 8;
|
||||
int encodedCatchHandlerBaseOffset = offset;
|
||||
offset += Leb128Utils.unsignedLeb128Size(encodedCatchHandlers.length);
|
||||
for (EncodedCatchHandler encodedCatchHandler: encodedCatchHandlers) {
|
||||
offset += encodedCatchHandler.place(offset, encodedCatchHandlerBaseOffset);
|
||||
offset = encodedCatchHandler.place(offset, encodedCatchHandlerBaseOffset);
|
||||
}
|
||||
}
|
||||
return offset;
|
||||
|
Loading…
x
Reference in New Issue
Block a user