From a688bbf1155e98a2f8110754f6611e3d1238b6d4 Mon Sep 17 00:00:00 2001 From: sta Date: Fri, 29 Jan 2021 19:36:32 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/Net/RequestStream.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/websocket-sharp/Net/RequestStream.cs b/websocket-sharp/Net/RequestStream.cs index 26ff6d4a..69cef07c 100644 --- a/websocket-sharp/Net/RequestStream.cs +++ b/websocket-sharp/Net/RequestStream.cs @@ -148,7 +148,7 @@ namespace WebSocketSharp.Net if (count > _count) count = _count; - if (_bodyLeft > 0 && count > _bodyLeft) + if (_bodyLeft > 0 && _bodyLeft < count) count = (int) _bodyLeft; Buffer.BlockCopy (_buffer, _offset, buffer, offset, count);