From fcf6fd57eefac1061c835613a4385aff94fcf9f5 Mon Sep 17 00:00:00 2001 From: Christian Date: Wed, 15 Aug 2012 19:17:21 -0400 Subject: [PATCH] Fix up null array in keybinding handler --- fml/client/cpw/mods/fml/client/registry/KeyBindingRegistry.java | 2 ++ fml/common/cpw/mods/fml/common/network/EntitySpawnPacket.java | 1 - 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/fml/client/cpw/mods/fml/client/registry/KeyBindingRegistry.java b/fml/client/cpw/mods/fml/client/registry/KeyBindingRegistry.java index c824046d45..6438f0cafe 100644 --- a/fml/client/cpw/mods/fml/client/registry/KeyBindingRegistry.java +++ b/fml/client/cpw/mods/fml/client/registry/KeyBindingRegistry.java @@ -52,8 +52,10 @@ public class KeyBindingRegistry */ public KeyHandler(KeyBinding[] keyBindings, boolean[] repeatings) { + assert keyBindings.length == repeatings.length : "You need to pass two arrays of identical length"; this.keyBindings = keyBindings; this.repeatings = repeatings; + this.keyDown = new boolean[keyBindings.length]; } public KeyBinding[] getKeyBindings() diff --git a/fml/common/cpw/mods/fml/common/network/EntitySpawnPacket.java b/fml/common/cpw/mods/fml/common/network/EntitySpawnPacket.java index 8f34c2fb5e..5ed0349fc1 100644 --- a/fml/common/cpw/mods/fml/common/network/EntitySpawnPacket.java +++ b/fml/common/cpw/mods/fml/common/network/EntitySpawnPacket.java @@ -126,7 +126,6 @@ public class EntitySpawnPacket extends FMLPacket ((IEntityAdditionalSpawnData)ent).writeSpawnData(dat); } - return dat.toByteArray(); }