Merge pull request #289 from yueh/fix-288
Fixed an off by one error in CableBusStorage
This commit is contained in:
commit
c737de91e3
1 changed files with 2 additions and 2 deletions
|
@ -88,12 +88,12 @@ public class CableBusStorage
|
|||
|
||||
private <T> 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++;
|
||||
|
|
Loading…
Reference in a new issue