mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
Fix bug in InputStream.read implementation
This commit is contained in:
parent
7f33f64d25
commit
5c189cfe15
|
@ -36,7 +36,7 @@ public abstract class TInputStream extends TObject implements TCloseable {
|
|||
for (int i = 0; i < len; ++i) {
|
||||
int bt = read();
|
||||
if (bt < 0) {
|
||||
return i;
|
||||
return i == 0 ? -1 : i;
|
||||
}
|
||||
b[off++] = (byte)bt;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user