From 989acd0afbfc2e484bfa16be6e5d1b74118ee87f Mon Sep 17 00:00:00 2001 From: Tahg Date: Tue, 24 Jan 2012 18:47:29 -0500 Subject: [PATCH] Fix invalid data in pistons --- src/main/java/net/minecraft/server/BlockPiston.java | 1 + 1 file changed, 1 insertion(+) diff --git a/src/main/java/net/minecraft/server/BlockPiston.java b/src/main/java/net/minecraft/server/BlockPiston.java index 17ba1e6fa5..d08f4274ec 100644 --- a/src/main/java/net/minecraft/server/BlockPiston.java +++ b/src/main/java/net/minecraft/server/BlockPiston.java @@ -218,6 +218,7 @@ public class BlockPiston extends Block { } public static int d(int i) { + if ((i & 7) >= Facing.a.length) return 0; // CraftBukkit - check for AIOOB on piston data return i & 7; }