From 20a3fbbd110a6a3b998dc84b3ab4ad283025bc0b Mon Sep 17 00:00:00 2001 From: tiagofneto Date: Fri, 27 Oct 2023 15:55:52 +0600 Subject: [PATCH] fix: Words64 into u256 empty words --- src/utils/types/words64.cairo | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/utils/types/words64.cairo b/src/utils/types/words64.cairo index 758f2b1..2537bff 100644 --- a/src/utils/types/words64.cairo +++ b/src/utils/types/words64.cairo @@ -12,6 +12,10 @@ impl Words64TryIntoU256LE of TryInto { return Option::None(()); } + if self.len() == 0 { + return Option::Some(0); + } + let pows = array![ 0x10000000000000000, // 2 ** 64 0x100000000000000000000000000000000, // 2 ** 128