From ae1a7ddc0f209860a130f7f6ad1f43fc23bb7965 Mon Sep 17 00:00:00 2001 From: yueh Date: Sat, 11 Oct 2014 12:09:17 +0200 Subject: [PATCH] Fixed an off by one error in CableBusStorage This will fix #269 and #288 --- src/main/java/appeng/parts/CableBusStorage.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/appeng/parts/CableBusStorage.java b/src/main/java/appeng/parts/CableBusStorage.java index e231c8c6..50a72a50 100644 --- a/src/main/java/appeng/parts/CableBusStorage.java +++ b/src/main/java/appeng/parts/CableBusStorage.java @@ -88,12 +88,12 @@ public class CableBusStorage private T[] shrink(T[] in, boolean parts) { - int newSize = 0; + int newSize = -1; for (int x = 0; x < in.length; x++) if ( in[x] != null ) newSize = x; - if ( newSize == 0 ) + if ( newSize == -1 ) return null; newSize++;