mirror of
https://github.com/aaru-dps/Aaru.git
synced 2025-12-16 19:24:25 +00:00
Use Stream extension to ensure read operations return the requested number of bytes (unless EOF arrives first).
This commit is contained in:
@@ -39,6 +39,7 @@ using Aaru.CommonTypes;
|
||||
using Aaru.CommonTypes.Enums;
|
||||
using Aaru.CommonTypes.Interfaces;
|
||||
using Aaru.Console;
|
||||
using Aaru.Helpers;
|
||||
|
||||
public sealed partial class DiskDupe
|
||||
{
|
||||
@@ -105,7 +106,7 @@ public sealed partial class DiskDupe
|
||||
|
||||
strm.Seek(_trackOffsets[trackNum] + sectorOffset * _imageInfo.SectorSize, SeekOrigin.Begin);
|
||||
|
||||
strm.Read(buffer, 0, (int)_imageInfo.SectorSize);
|
||||
strm.EnsureRead(buffer, 0, (int)_imageInfo.SectorSize);
|
||||
}
|
||||
|
||||
return ErrorNumber.NoError;
|
||||
|
||||
Reference in New Issue
Block a user