From c4cb334b93848681f1204d3e8bfb8a91811552a4 Mon Sep 17 00:00:00 2001 From: sta Date: Wed, 11 Sep 2019 22:08:53 +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 bc3a474f..0318a387 100644 --- a/websocket-sharp/Ext.cs +++ b/websocket-sharp/Ext.cs @@ -1833,8 +1833,14 @@ namespace WebSocketSharp /// public static void Times (this uint n, Action action) { - if (n > 0 && action != null) - ((ulong) n).times (action); + if (n <= 0) + return; + + if (action == null) + return; + + for (uint i = 0; i < n; i++) + action (); } ///