Fix AIOOB exception in crash reporting if exception does not have a stack. Possible, but odd.
This commit is contained in:
parent
031e7a5e7e
commit
c1ba77eb3f
1 changed files with 12 additions and 0 deletions
12
patches/minecraft/net/minecraft/crash/CrashReport.java.patch
Normal file
12
patches/minecraft/net/minecraft/crash/CrashReport.java.patch
Normal file
|
@ -0,0 +1,12 @@
|
|||
--- ../src_base/minecraft/net/minecraft/crash/CrashReport.java
|
||||
+++ ../src_work/minecraft/net/minecraft/crash/CrashReport.java
|
||||
@@ -253,7 +253,8 @@
|
||||
StackTraceElement stacktraceelement = null;
|
||||
StackTraceElement stacktraceelement1 = null;
|
||||
|
||||
- if (astacktraceelement != null && astacktraceelement.length - j < astacktraceelement.length)
|
||||
+ int idx = astacktraceelement.length - j; //Forge fix AIOOB exception.
|
||||
+ if (astacktraceelement != null && idx < astacktraceelement.length && idx >= 0)
|
||||
{
|
||||
stacktraceelement = astacktraceelement[astacktraceelement.length - j];
|
||||
|
Loading…
Reference in a new issue