[Modify] Throw exception

This commit is contained in:
sta 2018-12-21 20:04:26 +09:00
parent 7a2a2718f3
commit c57f1dc134

View File

@ -779,7 +779,10 @@ namespace WebSocketSharp.Net
/// </param>
public static string HtmlDecode (string s)
{
if (s == null || s.Length == 0 || !s.Contains ('&'))
if (s == null)
throw new ArgumentNullException ("s");
if (s.Length == 0)
return s;
var entity = new StringBuilder ();