Commit 71038fd5 by Jeff Sturm Committed by Jeff Sturm

IdentityHashMap.java (get): Fix off-by-one error.

	* java/util/IdentityHashMap.java (get): Fix off-by-one error.
	(put): Likewise.

From-SVN: r45077
parent e9e4208a
2001-08-21 Jeff Sturm <jsturm@one-point.com>
* java/util/IdentityHashMap.java (get): Fix off-by-one error.
(put): Likewise.
2001-08-20 Tom Tromey <tromey@redhat.com>
* java/awt/GridBagConstraints.java: Removed comment.
......
......@@ -172,7 +172,7 @@ public class IdentityHashMap extends AbstractMap
if (table[h] == emptyslot)
return null;
h += 2;
if (h > table.length)
if (h >= table.length)
h = 0;
if (h == save)
return null;
......@@ -257,7 +257,7 @@ public class IdentityHashMap extends AbstractMap
break;
}
h += 2;
if (h > table.length)
if (h >= table.length)
h = 0;
if (h == save)
break;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment