aboutsummaryrefslogtreecommitdiffstats
path: root/global-functions.rsc
diff options
context:
space:
mode:
authorGravatar Christian Hesse <mail@eworm.de>2024-09-13 10:16:17 +0200
committerGravatar Christian Hesse <mail@eworm.de>2024-09-13 10:22:06 +0200
commit41b19b045ad98c528ce9d8d84ab086fe7c54f265 (patch)
treef24a68af49bf101eabc026d9edc85bcc15e1c856 /global-functions.rsc
parentfe52bd4a0a496f896439887c0943e38e8f39ce2c (diff)
global-functions: $VersionToNum: support "zero"...
... to have a clean way to generate bitmasks. [admin@mikrotik] > :put [ $VersionToNum 0.255zero0 ] 16711680 [admin@mikrotik] > :put 0x00ff0000 16711680 Once implemented everywhere the internal calculation could be changed easily.
Diffstat (limited to 'global-functions.rsc')
-rw-r--r--global-functions.rsc3
1 files changed, 2 insertions, 1 deletions
diff --git a/global-functions.rsc b/global-functions.rsc
index 41120fd..9ee5312 100644
--- a/global-functions.rsc
+++ b/global-functions.rsc
@@ -1485,7 +1485,7 @@
:global CharacterReplace;
:set Input [ $CharacterReplace $Input "." "," ];
- :foreach I in={ "alpha"; "beta"; "rc" } do={
+ :foreach I in={ "zero"; "alpha"; "beta"; "rc" } do={
:set Input [ $CharacterReplace $Input $I ("," . $I . ",") ];
}
@@ -1496,6 +1496,7 @@
:set Return ($Return + 0xff00);
:set Multi ($Multi / 0x100);
} else={
+ :if ($Value = "zero") do={ }
:if ($Value = "alpha") do={ :set Return ($Return + 0x3f00); }
:if ($Value = "beta") do={ :set Return ($Return + 0x5f00); }
:if ($Value = "rc") do={ :set Return ($Return + 0x7f00); }