File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
app/src/main/java/com/wmods/wppenhacer/xposed/features/general Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change 88import com .wmods .wppenhacer .xposed .core .Feature ;
99import com .wmods .wppenhacer .xposed .core .devkit .Unobfuscator ;
1010
11+ import java .util .ArrayList ;
1112import java .util .Collection ;
1213import java .util .Iterator ;
1314import java .util .LinkedHashMap ;
@@ -50,6 +51,17 @@ protected void beforeHookedMethod(MethodHookParam param) throws Throwable {
5051 }
5152 });
5253
54+ // Fix bug in initialCapacity of ArrayList
55+ XposedHelpers .findAndHookConstructor (ArrayList .class , int .class , new XC_MethodHook () {
56+ @ Override
57+ protected void beforeHookedMethod (MethodHookParam param ) throws Throwable {
58+ if ((int ) param .args [0 ] < 0 ) {
59+ param .args [0 ] = Math .abs ((int ) param .args [0 ]);
60+ }
61+ }
62+ });
63+
64+
5365 // This creates a modified linkedhashMap to return 0 if the fixed list is less than 60.
5466 XposedBridge .hookMethod (pinnedSetMethod , new XC_MethodHook () {
5567
You can’t perform that action at this time.
0 commit comments