1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-05-11 02:34:08 +02:00

Fix ResourceHandlerNotification buffer being unnecessarily large

This commit is contained in:
chylex 2020-06-05 06:19:50 +02:00
parent 63de08c635
commit 563124b68c

View File

@ -40,7 +40,7 @@ bool IResourceHandler.ReadResponse(Stream dataOut, out int bytesRead, ICallback
callback.Dispose();
try{
byte[] buffer = new byte[Math.Min(dataIn.Length, dataOut.Length)];
byte[] buffer = new byte[Math.Min(dataIn.Length - dataIn.Position, dataOut.Length)];
int length = buffer.Length;
dataIn.Read(buffer, 0, length);