[Modify] Polish it
This commit is contained in:
parent
e4789e56a6
commit
551a7ab7bf
@ -1199,11 +1199,10 @@ namespace WebSocketSharp.Net
|
|||||||
if (count < 0 || count > len - offset)
|
if (count < 0 || count > len - offset)
|
||||||
throw new ArgumentOutOfRangeException ("count");
|
throw new ArgumentOutOfRangeException ("count");
|
||||||
|
|
||||||
if (encoding == null)
|
|
||||||
encoding = Encoding.UTF8;
|
|
||||||
|
|
||||||
return count > 0
|
return count > 0
|
||||||
? encoding.GetString (urlDecodeToBytes (bytes, offset, count))
|
? (encoding ?? Encoding.UTF8).GetString (
|
||||||
|
urlDecodeToBytes (bytes, offset, count)
|
||||||
|
)
|
||||||
: String.Empty;
|
: String.Empty;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user