From 9c47c1e861798e1b80e987a23f75340781dddcf3 Mon Sep 17 00:00:00 2001 From: sta Date: Thu, 12 Sep 2019 20:11:01 +0900 Subject: [PATCH] [Modify] Polish it --- websocket-sharp/Ext.cs | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/websocket-sharp/Ext.cs b/websocket-sharp/Ext.cs index a3eb501d..4cff4d18 100644 --- a/websocket-sharp/Ext.cs +++ b/websocket-sharp/Ext.cs @@ -1854,8 +1854,14 @@ namespace WebSocketSharp /// public static void Times (this ulong n, Action action) { - if (n > 0 && action != null) - n.times (action); + if (n <= 0) + return; + + if (action == null) + return; + + for (ulong i = 0; i < n; i++) + action (); } ///