From bed6c410b6e80956f573984f1302767ad22ef91b Mon Sep 17 00:00:00 2001 From: LexManos Date: Wed, 15 Aug 2012 04:37:45 -0700 Subject: [PATCH] Fix potential index exception in ForgeDirection --- common/net/minecraftforge/common/ForgeDirection.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/common/net/minecraftforge/common/ForgeDirection.java b/common/net/minecraftforge/common/ForgeDirection.java index 3a2219a90..16516bbe2 100644 --- a/common/net/minecraftforge/common/ForgeDirection.java +++ b/common/net/minecraftforge/common/ForgeDirection.java @@ -40,7 +40,7 @@ public enum ForgeDirection public static ForgeDirection getOrientation(int id) { - if (id < ForgeDirection.values().length) + if (id > 0 && id < ForgeDirection.values().length) { return ForgeDirection.values()[id]; }