diff --git a/src/main/kotlin/app/revanced/patcher/util/smali/InlineSmaliCompiler.kt b/src/main/kotlin/app/revanced/patcher/util/smali/InlineSmaliCompiler.kt index 39920a47..eb5eca5a 100644 --- a/src/main/kotlin/app/revanced/patcher/util/smali/InlineSmaliCompiler.kt +++ b/src/main/kotlin/app/revanced/patcher/util/smali/InlineSmaliCompiler.kt @@ -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.