diff options
author | Christian Hesse <mail@eworm.de> | 2020-06-29 16:32:19 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2020-06-29 16:32:19 +0200 |
commit | baba79e3f5421b82158aa6a5466ae2b8c9caf34d (patch) | |
tree | 2a7706d2e0d777b73c12d8cfb315565419b07bdd | |
parent | 38760d05b0c5e771bfa1714c0ebde061d0611983 (diff) |
global-functions: $GetRandomNumber: return 32bit number without limit
-rw-r--r-- | global-functions | 5 |
1 files changed, 4 insertions, 1 deletions
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; |