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:
parent
63de08c635
commit
563124b68c
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user