mirror of
https://github.com/revanced/smali.git
synced 2025-05-04 16:44:25 +02:00
Fix for method reference sizes
The protos can be shared across methods so we should not be counting them as part of private method size.
This commit is contained in:
parent
67e7b39dfc
commit
f16b420b70
@ -102,15 +102,11 @@ public class DexBackedMethodReference extends BaseMethodReference {
|
|||||||
/**
|
/**
|
||||||
* Calculate and return the private size of a method reference.
|
* Calculate and return the private size of a method reference.
|
||||||
*
|
*
|
||||||
* Calculated as: class_idx + proto_idx + name_idx + prototype size
|
* Calculated as: class_idx + proto_idx + name_idx
|
||||||
*
|
*
|
||||||
* @return size in bytes
|
* @return size in bytes
|
||||||
*/
|
*/
|
||||||
public int getSize() {
|
public int getSize() {
|
||||||
int size = MethodIdItem.ITEM_SIZE; //ushort + ushort + uint for indices
|
return MethodIdItem.ITEM_SIZE; //ushort + ushort + uint for indices
|
||||||
DexBackedMethodProtoReference protoRef = new DexBackedMethodProtoReference(dexFile,
|
|
||||||
dexFile.readUshort(methodIdItemOffset + MethodIdItem.PROTO_OFFSET));
|
|
||||||
size += protoRef.getSize();
|
|
||||||
return size;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user