From 904bbdaa3660ae9c3bc99251a45a9ba283cfb7fc Mon Sep 17 00:00:00 2001 From: sta Date: Wed, 26 Sep 2018 20:38:57 +0900 Subject: [PATCH] [Modify] Throw exception --- websocket-sharp/Net/HttpUtility.cs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/websocket-sharp/Net/HttpUtility.cs b/websocket-sharp/Net/HttpUtility.cs index 7d1b4001..af2be570 100644 --- a/websocket-sharp/Net/HttpUtility.cs +++ b/websocket-sharp/Net/HttpUtility.cs @@ -996,7 +996,10 @@ namespace WebSocketSharp.Net 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; var buff = new StringBuilder ();