mirror of
https://github.com/ReVanced/revanced-patcher.git
synced 2026-01-11 13:56:16 +00: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