This commit is contained in:
Joel Dice 2007-08-13 20:35:49 -06:00
parent d0e519d992
commit 587dbeb163
2 changed files with 8 additions and 4 deletions

View File

@ -44,6 +44,10 @@ public class BufferedReader extends Reader {
public int read(char[] b, int offset, int length) throws IOException {
int count = 0;
if (position >= limit && length < buffer.length) {
fill();
}
if (position < limit) {
int remaining = limit - position;
if (remaining > length) {

View File

@ -1872,10 +1872,10 @@ hashMapInsert(Thread* t, object map, object key, object value,
PROTECT(t, key);
PROTECT(t, value);
t->vm->weakReferences = makeWeakReference
(t, t->vm->weakReferences, 0, 0, 0);
jreferenceTarget(t, t->vm->weakReferences) = key;
key = t->vm->weakReferences;
object r = makeWeakReference(t, 0, 0, 0, 0);
jreferenceTarget(t, r) = key;
jreferenceNext(t, r) = t->vm->weakReferences;
key = t->vm->weakReferences = r;
}
object n = makeTriple(t, key, value, arrayBody(t, array, index));