Fixed a bug in insert().
git-svn-id: https://samskivert.googlecode.com/svn/trunk@837 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
//
|
//
|
||||||
// $Id: ListUtil.java,v 1.8 2002/09/06 02:09:05 shaper Exp $
|
// $Id: ListUtil.java,v 1.9 2002/09/20 21:27:54 mdb Exp $
|
||||||
|
|
||||||
package com.samskivert.util;
|
package com.samskivert.util;
|
||||||
|
|
||||||
@@ -131,6 +131,10 @@ public class ListUtil
|
|||||||
// value)
|
// value)
|
||||||
if (list[size-1] != null) {
|
if (list[size-1] != null) {
|
||||||
list = accomodate(list, size);
|
list = accomodate(list, size);
|
||||||
|
} else {
|
||||||
|
// otherwise, pretend the list is one element shorter and
|
||||||
|
// we'll overwrite the last null
|
||||||
|
size--;
|
||||||
}
|
}
|
||||||
|
|
||||||
// shift everything down
|
// shift everything down
|
||||||
|
|||||||
Reference in New Issue
Block a user