diff options
author | Christian Hesse <mail@eworm.de> | 2023-03-30 20:58:19 +0200 |
---|---|---|
committer | Christian Hesse <mail@eworm.de> | 2023-03-30 20:58:19 +0200 |
commit | 415c4144f2e1ee32a0b588e2d66ec95d6d40e612 (patch) | |
tree | e15fc0d6d24d5cc1fd70af4b513f76121ad3c763 /global-functions.rsc | |
parent | 5f374c469a0bc49b2c9bf26cc3129e747867cc42 (diff) |
global-functions: $VersionToNum: support "alpha" in version string
Diffstat (limited to 'global-functions.rsc')
-rw-r--r-- | global-functions.rsc | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/global-functions.rsc b/global-functions.rsc index 82823fb..f75ed54 100644 --- a/global-functions.rsc +++ b/global-functions.rsc @@ -1226,8 +1226,10 @@ :global CharacterReplace; - :set Input [ $CharacterReplace [ $CharacterReplace [ $CharacterReplace $Input \ - "." "," ] "beta" ",beta," ] "rc" ",rc," ]; + :set Input [ $CharacterReplace $Input "." "," ]; + :foreach I in={ "alpha"; "beta"; "rc" } do={ + :set Input [ $CharacterReplace $Input $I ("," . $I . ",") ]; + } :foreach Value in=([ :toarray $Input ], 0) do={ :local Num [ :tonum $Value ]; @@ -1236,7 +1238,8 @@ :set Return ($Return + 0xff00); :set Multi ($Multi / 0x100); } else={ - :if ($Value = "beta") do={ :set Return ($Return + 0x3f00); } + :if ($Value = "alpha") do={ :set Return ($Return + 0x3f00); } + :if ($Value = "beta") do={ :set Return ($Return + 0x5f00); } :if ($Value = "rc") do={ :set Return ($Return + 0x7f00); } } } |