Browse Source
Update src/ImageSharp/IO/BufferedReadStream.cs
Co-authored-by: Günther Foidl <gue@korporal.at>
pull/2267/head
James Jackson-South
4 years ago
committed by
GitHub
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with
1 additions and
1 deletions
-
src/ImageSharp/IO/BufferedReadStream.cs
|
|
|
@ -172,7 +172,7 @@ internal sealed class BufferedReadStream : Stream |
|
|
|
|
|
|
|
// Too big for remaining buffer but less than entire buffer length
|
|
|
|
// Copy to buffer then read from there.
|
|
|
|
if (this.readBufferIndex < 0 || (count + this.readBufferIndex > this.BufferSize)) |
|
|
|
if (this.readBufferIndex < 0 || (this.readBufferIndex > this.BufferSize - count)) |
|
|
|
{ |
|
|
|
return this.ReadToBufferViaCopySlow(buffer); |
|
|
|
} |
|
|
|
|