From d86ccd8bb2a8ffd60583a6f7f52d3545d7cc81a8 Mon Sep 17 00:00:00 2001 From: Augustyn Chmiel Date: Mon, 21 Oct 2024 11:16:12 +0200 Subject: [PATCH] correcting imports of style --- engine/utils/utils.go | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/engine/utils/utils.go b/engine/utils/utils.go index 32bcbb61..9ed291e2 100644 --- a/engine/utils/utils.go +++ b/engine/utils/utils.go @@ -62,6 +62,10 @@ func GetChildNumsFromHex(hexHash string) ([]uint32, error) { if err != nil { return nil, spverrors.Wrapf(err, "cannot parse child number from hex string") } + + if num > MaxInt32 { + num = num - MaxInt32 + } childNums = append(childNums, uint32(num)) //nolint:gosec // todo: re-work to remove casting (possible cutoff) }