From baba79e3f5421b82158aa6a5466ae2b8c9caf34d Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Mon, 29 Jun 2020 16:32:19 +0200 Subject: global-functions: $GetRandomNumber: return 32bit number without limit --- global-functions | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/global-functions b/global-functions index eaf4532..3a2b19d 100644 --- a/global-functions +++ b/global-functions @@ -308,7 +308,10 @@ # generate random number :set GetRandomNumber do={ - :local Max ([ :tonum $1 ] + 1); + :local Max 4294967296; + :if ([ :typeof $1 ] != "nothing" ) do={ + :set Max ([ :tonum $1 ] + 1); + } :global GetRandomSha256; -- cgit v1.2.3-54-g00ecf