Skip to content

Commit e32132a

Browse files
committed
I don't know, but I think it should be this condition.
1 parent 0e42dc5 commit e32132a

File tree

1 file changed

+2
-2
lines changed
  • Provider/src/FirebirdSql.Data.FirebirdClient/Client/Managed

1 file changed

+2
-2
lines changed

Provider/src/FirebirdSql.Data.FirebirdClient/Client/Managed/XdrStream.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,7 @@ public byte[] ReadBytes(byte[] buffer, int count)
361361
{
362362
toRead -= (currentlyRead = Read(buffer, count - toRead, toRead));
363363
}
364-
if (toRead == count)
364+
if (toRead > 0)
365365
{
366366
_ioFailed = true;
367367
throw new IOException();
@@ -379,7 +379,7 @@ public async Task<byte[]> ReadBytesAsync(byte[] buffer, int count)
379379
{
380380
toRead -= (currentlyRead = await ReadAsync(buffer, count - toRead, toRead).ConfigureAwait(false));
381381
}
382-
if (toRead == count)
382+
if (toRead > 0)
383383
{
384384
_ioFailed = true;
385385
throw new IOException();

0 commit comments

Comments
 (0)