mirror of
https://github.com/revanced/revanced-patcher.git
synced 2025-04-29 21:04:26 +02:00
fix: Check for class type exactly instead of with contains (#310)
This commit is contained in:
parent
525beda18e
commit
69f2f20fd9
@ -128,7 +128,7 @@ class Fingerprint internal constructor(
|
||||
fun match(
|
||||
context: BytecodePatchContext,
|
||||
method: Method,
|
||||
) = match(context, method, context.classByType(method.definingClass)!!.immutableClass)
|
||||
) = match(context, method, context.classBy { method.definingClass == it.type }!!.immutableClass)
|
||||
|
||||
/**
|
||||
* Match using a [Method].
|
||||
|
@ -104,6 +104,7 @@ class BytecodePatchContext internal constructor(private val config: PatcherConfi
|
||||
* @param type The type of the class.
|
||||
* @return A proxy for the first class that matches the type.
|
||||
*/
|
||||
@Deprecated("Use classBy { type in it.type } instead.", ReplaceWith("classBy { type in it.type }"))
|
||||
fun classByType(type: String) = classBy { type in it.type }
|
||||
|
||||
/**
|
||||
|
@ -179,7 +179,9 @@ internal object ClassMerger {
|
||||
callback: MutableClass.() -> Unit,
|
||||
) {
|
||||
callback(targetClass)
|
||||
this.classByType(targetClass.superclass ?: return)?.mutableClass?.let {
|
||||
|
||||
targetClass.superclass ?: return
|
||||
this.classBy { targetClass.superclass == it.type }?.mutableClass?.let {
|
||||
traverseClassHierarchy(it, callback)
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user