From c57f1dc134b54b7854fe58ca328f2735b98a2cdb Mon Sep 17 00:00:00 2001 From: sta Date: Fri, 21 Dec 2018 20:04:26 +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 4d9f8ad0..16cf9bb1 100644 --- a/websocket-sharp/Net/HttpUtility.cs +++ b/websocket-sharp/Net/HttpUtility.cs @@ -779,7 +779,10 @@ namespace WebSocketSharp.Net /// 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 ();