diff options
-rw-r--r-- | global-functions | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/global-functions b/global-functions index d4aa574..2cfe595 100644 --- a/global-functions +++ b/global-functions @@ -429,12 +429,12 @@ # convert from hex (string) to num :set HexToNum do={ :local Input [ :tostr $1 ]; - :local Hex "0123456789abcdef"; + :local Hex "0123456789abcdef0123456789ABCDEF"; :local Multi 1; :local Return 0; :for I from=([ :len $Input ] - 1) to=0 do={ - :set Return ($Return + ([ :find $Hex [ :pick $Input $I ] ] * $Multi)); + :set Return ($Return + (([ :find $Hex [ :pick $Input $I ] ] % 16) * $Multi)); :set Multi ($Multi * 16); } |