mirror of
https://github.com/Maschell/JNUSLib.git
synced 2024-11-22 16:09:18 +01:00
Use break on reading error instead of return, this way the streams will be closed properly.
This commit is contained in:
parent
c47c9913ac
commit
3a6f592294
@ -71,7 +71,9 @@ public class WUDDiscReaderCompressed extends WUDDiscReader {
|
|||||||
input.seek(offset2);
|
input.seek(offset2);
|
||||||
int read = input.read(buffer);
|
int read = input.read(buffer);
|
||||||
|
|
||||||
if (read < 0) return;
|
if (read < 0) {
|
||||||
|
break;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
out.write(Arrays.copyOfRange(buffer, 0, bytesToRead));
|
out.write(Arrays.copyOfRange(buffer, 0, bytesToRead));
|
||||||
} catch (IOException e) {
|
} catch (IOException e) {
|
||||||
|
Loading…
Reference in New Issue
Block a user