fix: String.toInstructions defaulting forStaticMethod to false

Fixes revanced/revanced-patches#46
This commit is contained in:
oSumAtrIX 2022-06-21 23:52:09 +02:00
parent a3005fa08e
commit 5a2f02b97d
No known key found for this signature in database
GPG key ID: A9B3094ACDB604B4

View file

@ -67,7 +67,8 @@ class InlineSmaliCompiler {
fun String.toInstructions(templateMethod: Method? = null) = InlineSmaliCompiler.compile(this,
templateMethod?.parameters?.joinToString("") { it } ?: "",
templateMethod?.implementation?.registerCount ?: 1,
(templateMethod?.accessFlags ?: 0) and AccessFlags.STATIC.value != 0)
templateMethod?.let { AccessFlags.STATIC.isSet(it.accessFlags) } ?: true
)
/**
* Compile a line of Smali code to an instruction.