Use break on reading error instead of return, this way the streams will be closed properly.

This commit is contained in:
Maschell 2019-04-19 10:43:32 +02:00
parent c47c9913ac
commit 3a6f592294

View File

@ -71,7 +71,9 @@ public class WUDDiscReaderCompressed extends WUDDiscReader {
input.seek(offset2);
int read = input.read(buffer);
if (read < 0) return;
if (read < 0) {
break;
}
try {
out.write(Arrays.copyOfRange(buffer, 0, bytesToRead));
} catch (IOException e) {