mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Fix bug in InputStreamReader
This commit is contained in:
parent
b71ba395fd
commit
bb0cd3e180
|
@ -75,6 +75,9 @@ public class TInputStreamReader extends TReader {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public int read(char[] cbuf, int off, int len) throws TIOException {
|
public int read(char[] cbuf, int off, int len) throws TIOException {
|
||||||
|
if (eof && outBuffer.end()) {
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
CharBuffer wrapBuffer = new CharBuffer(cbuf, off, off + len);
|
CharBuffer wrapBuffer = new CharBuffer(cbuf, off, off + len);
|
||||||
while (!wrapBuffer.end()) {
|
while (!wrapBuffer.end()) {
|
||||||
wrapBuffer.put(outBuffer);
|
wrapBuffer.put(outBuffer);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user