1
0
mirror of https://github.com/chylex/TweetDuck.git synced 2025-06-01 11:34:04 +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(); callback.Dispose();
try{ 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; int length = buffer.Length;
dataIn.Read(buffer, 0, length); dataIn.Read(buffer, 0, length);