From fdec69827332cbc573a05cea384874dc93268d6c Mon Sep 17 00:00:00 2001 From: sta Date: Tue, 16 Oct 2018 19:37:45 +0900 Subject: [PATCH] [Modify] Throw ArgumentOutOfRangeException --- websocket-sharp/Net/HttpUtility.cs | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/websocket-sharp/Net/HttpUtility.cs b/websocket-sharp/Net/HttpUtility.cs index b859fab3..94b1946b 100644 --- a/websocket-sharp/Net/HttpUtility.cs +++ b/websocket-sharp/Net/HttpUtility.cs @@ -1234,8 +1234,11 @@ namespace WebSocketSharp.Net var len = bytes.Length; if (len == 0) { - if (offset != 0 || count != 0) - throw new ArgumentException ("An empty byte array.", "bytes"); + if (offset != 0) + throw new ArgumentOutOfRangeException ("offset"); + + if (count != 0) + throw new ArgumentOutOfRangeException ("count"); return String.Empty; }