[Modify] Throw exception

This commit is contained in:
sta 2018-10-13 20:33:31 +09:00
parent 2a6010ee54
commit 00a7de1508

View File

@ -1161,8 +1161,11 @@ namespace WebSocketSharp.Net
public static byte[] UrlDecodeToBytes (byte[] bytes) public static byte[] UrlDecodeToBytes (byte[] bytes)
{ {
int len; if (bytes == null)
return bytes != null && (len = bytes.Length) > 0 throw new ArgumentNullException ("bytes");
var len = bytes.Length;
return len > 0
? InternalUrlDecodeToBytes (bytes, 0, len) ? InternalUrlDecodeToBytes (bytes, 0, len)
: bytes; : bytes;
} }