FIX : IndexOutOfBoundException

This commit is contained in:
Alexandre DUPONCHEL 2016-07-28 17:59:59 +02:00
parent ab64d1a166
commit b0fd97557e
1 changed files with 2 additions and 2 deletions

View File

@ -36,8 +36,8 @@ public class FMLSecurityManager extends SecurityManager {
if (permName.startsWith("exitVM"))
{
Class<?>[] classContexts = getClassContext();
String callingClass = classContexts.length > 3 ? classContexts[4].getName() : "none";
String callingParent = classContexts.length > 4 ? classContexts[5].getName() : "none";
String callingClass = classContexts.length > 4 ? classContexts[4].getName() : "none";
String callingParent = classContexts.length > 5 ? classContexts[5].getName() : "none";
// FML is allowed to call system exit and the Minecraft applet (from the quit button)
if (!(callingClass.startsWith("net.minecraftforge.fml.")
|| "net.minecraft.server.dedicated.ServerHangWatchdog$1".equals(callingClass)