1
0
mirror of https://github.com/eworm-de/routeros-scripts.git synced 2024-05-11 05:55:19 +00:00

global-functions: $GetRandomNumber: return 32bit number without limit

This commit is contained in:
Christian Hesse
2020-06-29 16:32:19 +02:00
parent 38760d05b0
commit baba79e3f5

View File

@ -308,7 +308,10 @@
# generate random number # generate random number
:set GetRandomNumber do={ :set GetRandomNumber do={
:local Max ([ :tonum $1 ] + 1); :local Max 4294967296;
:if ([ :typeof $1 ] != "nothing" ) do={
:set Max ([ :tonum $1 ] + 1);
}
:global GetRandomSha256; :global GetRandomSha256;