projects
/
org.ibex.core.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
30bafaa
)
2003/06/13 04:19:28
author
megacz
<megacz@xwt.org>
Fri, 30 Jan 2004 07:01:05 +0000
(07:01 +0000)
committer
megacz
<megacz@xwt.org>
Fri, 30 Jan 2004 07:01:05 +0000
(07:01 +0000)
darcs-hash:
20040130070105
-2ba56-
fc858a943985d99db30b05c99f98a5bf95387a93
.gz
src/org/xwt/Box.java
patch
|
blob
|
history
diff --git
a/src/org/xwt/Box.java
b/src/org/xwt/Box.java
index
c53ccc4
..
c01cdde
100644
(file)
--- a/
src/org/xwt/Box.java
+++ b/
src/org/xwt/Box.java
@@
-1062,7
+1062,7
@@
public final class Box extends JS.Scope {
public Object get(int i) {
if (redirect == null) return null;
if (redirect != this) return redirect.get(i);
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);
}
/**
}
/**
@@
-1072,6
+1072,7
@@
public final class Box extends JS.Scope {
* WARNING: O(n) runtime, unless i == numChildren()
*/
public void put(int i, Object value) {
* 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());
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());