Don't modify the argument array.

Just on the off chance that the user reuses it.
This commit is contained in:
player-03
2022-12-20 14:10:14 -05:00
committed by GitHub
parent b3bf305fc4
commit 505d90b6ae

View File

@@ -48,8 +48,7 @@ class JNI
public static function callMember(method:Dynamic, jobject:Dynamic, a:Array<Dynamic>):Dynamic
{
a.insert(0, jobject);
return Reflect.callMethod(null, method, a);
return Reflect.callMethod(null, method, [jobject].concat(a));
}
public static function callStatic(method:Dynamic, a:Array<Dynamic>):Dynamic