add constraint that i should be between 0 and 65535

This commit is contained in:
erik-krogh
2023-08-08 21:11:59 +02:00
parent 0391e063ca
commit 859e1bfabc

View File

@@ -105,6 +105,8 @@ private int toHex(string hex) {
*/
bindingset[i]
string to4digitHex(int i) {
i >= 0 and
i <= 65535 and
result =
"0123456789abcdef".charAt(i.bitShiftRight(12).bitAnd(15)) +
"0123456789abcdef".charAt(i.bitShiftRight(8).bitAnd(15)) +