public Object get(int i) {
if (redirect == null) return null;
if (redirect != this) return redirect.get(i);
- return i >= numChildren() ? null : getChild(i);
+ return i >= numChildren() || i < 0 ? null : getChild(i);
}
/**
* WARNING: O(n) runtime, unless i == numChildren()
*/
public void put(int i, Object value) {
+ if (i < 0) return;
if (value != null && !(value instanceof Box)) {
if (Log.on) Log.log(this, "attempt to set a numerical property on a box to anything other than a box at " + Context.getCurrentSourceNameAndLine());