fix: rename method wrapped by synthetic only from same class (#430)

This commit is contained in:
Skylot
2019-01-16 22:14:46 +03:00
parent 7c353a6c6f
commit 618b014b3d
@@ -221,6 +221,10 @@ public class ClassModifier extends AbstractVisitor {
if (callMth.getArgsCount() != mth.getMethodInfo().getArgsCount()) {
return false;
}
// rename method only from current class
if (!mth.getParentClass().equals(wrappedMth.getParentClass())) {
return false;
}
// all args must be registers passed from method args (allow only casts insns)
for (InsnArg arg : insn.getArguments()) {
if (!registersAndCastsOnly(arg)) {