[Modify] Throw ArgumentOutOfRangeException
This commit is contained in:
parent
6bb744abf5
commit
fdec698273
@ -1234,8 +1234,11 @@ namespace WebSocketSharp.Net
|
|||||||
|
|
||||||
var len = bytes.Length;
|
var len = bytes.Length;
|
||||||
if (len == 0) {
|
if (len == 0) {
|
||||||
if (offset != 0 || count != 0)
|
if (offset != 0)
|
||||||
throw new ArgumentException ("An empty byte array.", "bytes");
|
throw new ArgumentOutOfRangeException ("offset");
|
||||||
|
|
||||||
|
if (count != 0)
|
||||||
|
throw new ArgumentOutOfRangeException ("count");
|
||||||
|
|
||||||
return String.Empty;
|
return String.Empty;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user