mirror of
https://github.com/revanced/revanced-patcher.git
synced 2025-06-12 21:27:42 +02:00
fix: replaceWith
not replacing classes with used class proxies
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
@ -70,12 +70,13 @@ class Patcher(
|
||||
fun save(): Map<String, MemoryDataStore> {
|
||||
val newDexFile = object : DexFile {
|
||||
private fun MutableList<ClassDef>.replaceWith(proxy: ClassProxy) {
|
||||
if (proxy.proxyUsed) return
|
||||
this[proxy.originalIndex] = proxy.mutatedClass
|
||||
}
|
||||
|
||||
override fun getClasses(): Set<ClassDef> {
|
||||
for (proxy in patcherData.classProxies) {
|
||||
if (!proxy.proxyUsed) continue
|
||||
|
||||
patcherData.classes.replaceWith(proxy)
|
||||
}
|
||||
for (patch in patcherData.patches) {
|
||||
|
Reference in New Issue
Block a user