Skip to content

Commit 9d02f43

Browse files
committed
fix #96
1 parent 1b46795 commit 9d02f43

File tree

1 file changed

+5
-6
lines changed

1 file changed

+5
-6
lines changed

deobfuscator-transformers/src/main/java/uwu/narumi/deobfuscator/core/other/impl/universal/RemapperTransformer.java

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ protected void transform() throws Exception {
6565

6666
InheritanceVertex vertex = inheritanceGraph.getVertex(classWrapper.name());
6767
// Parents and children combined
68-
Set<InheritanceVertex> directVertices = vertex.getAllDirectVertices();
68+
Set<InheritanceVertex> vertexFamily = vertex.getFamily(false);
6969

7070
// Methods
7171
classWrapper.methods().forEach(methodNode -> {
@@ -86,12 +86,11 @@ protected void transform() throws Exception {
8686

8787
String newName = "method_" + methodCounter.getAndIncrement();
8888

89-
// Map current method
90-
remapper.methodMappings.put(methodRef, newName);
89+
// Map method in the whole inheritance graph
90+
for (InheritanceVertex member : vertexFamily) {
91+
if (member.isLibraryVertex()) continue;
9192

92-
// Map the same method in inheritance graph
93-
for (InheritanceVertex directVertex : directVertices) {
94-
remapper.methodMappings.put(MethodRef.of(directVertex.getValue(), methodNode), newName);
93+
remapper.methodMappings.put(MethodRef.of(member.getValue(), methodNode), newName);
9594
}
9695
});
9796

0 commit comments

Comments
 (0)