mirror of
https://github.com/inotia00/revanced-patches.git
synced 2025-05-05 00:54:32 +02:00
fix(youtube/litho-filter): incorrect smali syntax
This commit is contained in:
parent
39029bae09
commit
d771589db1
@ -35,7 +35,7 @@ class LithoFilterPatch : BytecodePatch(
|
||||
"""
|
||||
new-instance v1, $classDescriptor
|
||||
invoke-direct {v1}, $classDescriptor-><init>()V
|
||||
const/4 v2, ${filterCount++}
|
||||
${getConstString(2, filterCount++)}
|
||||
aput-object v1, v0, v2
|
||||
"""
|
||||
)
|
||||
@ -46,12 +46,17 @@ class LithoFilterPatch : BytecodePatch(
|
||||
}
|
||||
|
||||
override fun close() = LithoFilterFingerprint.result!!
|
||||
.mutableMethod.replaceInstruction(0, "const/4 v0, $filterCount")
|
||||
.mutableMethod.replaceInstruction(0, getConstString(0, filterCount))
|
||||
|
||||
companion object {
|
||||
internal lateinit var addFilter: (String) -> Unit
|
||||
private set
|
||||
|
||||
private var filterCount = 0
|
||||
|
||||
private fun getConstString(
|
||||
register: Int,
|
||||
count: Int
|
||||
): String = if (count >= 8) "const/16 v$register, $count" else "const/4 v$register, $count"
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user