fix: minor fixes for type update limit option (#2629)
This commit is contained in:
@@ -167,7 +167,11 @@ public class JadxArgs implements Closeable {
|
||||
|
||||
private IntegerFormat integerFormat = IntegerFormat.AUTO;
|
||||
|
||||
private int typeUpdatesLimitCount = 0;
|
||||
/**
|
||||
* Maximum updates allowed total in method per one instruction.
|
||||
* Should be more or equal 1, default value is 10.
|
||||
*/
|
||||
private int typeUpdatesLimitCount = 10;
|
||||
|
||||
private boolean useDxInput = false;
|
||||
|
||||
@@ -745,7 +749,7 @@ public class JadxArgs implements Closeable {
|
||||
}
|
||||
|
||||
public void setTypeUpdatesLimitCount(int typeUpdatesLimitCount) {
|
||||
this.typeUpdatesLimitCount = typeUpdatesLimitCount;
|
||||
this.typeUpdatesLimitCount = Math.max(1, typeUpdatesLimitCount);
|
||||
}
|
||||
|
||||
public boolean isUseDxInput() {
|
||||
@@ -849,7 +853,7 @@ public class JadxArgs implements Closeable {
|
||||
+ insertDebugLines + extractFinally
|
||||
+ debugInfo + escapeUnicode + replaceConsts + restoreSwitchOverString
|
||||
+ respectBytecodeAccModifiers + fsCaseSensitive + renameFlags
|
||||
+ commentsLevel + useDxInput + integerFormat
|
||||
+ commentsLevel + useDxInput + integerFormat + typeUpdatesLimitCount
|
||||
+ "|" + buildPluginsHash(decompiler);
|
||||
return FileUtils.md5Sum(argStr);
|
||||
}
|
||||
|
||||
@@ -22,7 +22,7 @@ public class TypeUpdateInfo {
|
||||
public TypeUpdateInfo(MethodNode mth, TypeUpdateFlags flags, JadxArgs args) {
|
||||
this.mth = mth;
|
||||
this.flags = flags;
|
||||
this.updatesLimitCount = mth.getInsnsCount() * (10 + args.getTypeUpdatesLimitCount());
|
||||
this.updatesLimitCount = mth.getInsnsCount() * args.getTypeUpdatesLimitCount();
|
||||
}
|
||||
|
||||
public void requestUpdate(InsnArg arg, ArgType changeType) {
|
||||
|
||||
Reference in New Issue
Block a user