[Modify] Throw exception

This commit is contained in:
sta 2018-09-26 20:38:57 +09:00
parent 8aedfa8cc8
commit 904bbdaa36

View File

@ -996,7 +996,10 @@ namespace WebSocketSharp.Net
public static string HtmlEncode (string s) public static string HtmlEncode (string s)
{ {
if (s == null || s.Length == 0) if (s == null)
throw new ArgumentNullException ("s");
if (s.Length == 0)
return s; return s;
var buff = new StringBuilder (); var buff = new StringBuilder ();