This commit is contained in:
Stephan D
2026-03-10 12:31:09 +01:00
parent d87e709f43
commit e77d1ab793
287 changed files with 2089 additions and 1550 deletions

View File

@@ -1,6 +1,7 @@
package shared
import (
"math"
"math/big"
"strings"
@@ -46,5 +47,9 @@ func DecodeHexUint8(input string) (uint8, error) {
if val.BitLen() > 8 {
return 0, errHexOutOfRange
}
return uint8(val.Uint64()), nil
decoded := val.Uint64()
if decoded > math.MaxUint8 {
return 0, errHexOutOfRange
}
return uint8(decoded), nil
}