Fix potential index exception in ForgeDirection
This commit is contained in:
parent
fc430243d1
commit
bed6c410b6
1 changed files with 1 additions and 1 deletions
|
@ -40,7 +40,7 @@ public enum ForgeDirection
|
||||||
|
|
||||||
public static ForgeDirection getOrientation(int id)
|
public static ForgeDirection getOrientation(int id)
|
||||||
{
|
{
|
||||||
if (id < ForgeDirection.values().length)
|
if (id > 0 && id < ForgeDirection.values().length)
|
||||||
{
|
{
|
||||||
return ForgeDirection.values()[id];
|
return ForgeDirection.values()[id];
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue