mirror of
https://github.com/ReVanced/revanced-patcher.git
synced 2024-11-10 01:02:22 +01:00
fix: replaceWith
not replacing classes with used class proxies
Signed-off-by: oSumAtrIX <johan.melkonyan1@web.de>
This commit is contained in:
parent
560c485ab0
commit
f0f34031dd
1 changed files with 2 additions and 1 deletions
|
@ -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) {
|
||||
|
|
Loading…
Reference in a new issue