From 415c4144f2e1ee32a0b588e2d66ec95d6d40e612 Mon Sep 17 00:00:00 2001 From: Christian Hesse Date: Thu, 30 Mar 2023 20:58:19 +0200 Subject: global-functions: $VersionToNum: support "alpha" in version string --- global-functions.rsc | 9 ++++++--- 1 file 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); } } } -- cgit v1.2.3-70-g09d2