Fix potential index exception in ForgeDirection

This commit is contained in:
LexManos 2012-08-15 04:37:45 -07:00
parent fc430243d1
commit bed6c410b6

View file

@ -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];
}