Add a synchronized block to the WUD disc reading.

This commit is contained in:
Maschell 2018-12-06 16:06:57 +01:00
parent 78b51226aa
commit a16c1943c0

View File

@ -58,6 +58,7 @@ public class WUDDiscReaderCompressed extends WUDDiscReader {
byte[] buffer = new byte[bufferSize];
RandomAccessFile input = getRandomAccessFileStream();
synchronized (input) {
while (usedSize > 0) {
long sectorOffset = (usedOffset % info.getSectorSize());
long remainingSectorBytes = info.getSectorSize() - sectorOffset;
@ -85,4 +86,5 @@ public class WUDDiscReaderCompressed extends WUDDiscReader {
}
input.close();
}
}
}