fix decoding

This commit is contained in:
Rígille S. B. Menezes 2021-11-12 14:30:12 -03:00
parent 6985117cb9
commit 671e0f6148

View File

@ -78,7 +78,7 @@ RLP.decoder.repeat<A: Type>(decoder: Bytes -> Pair<Bytes,A>, count: Nat, bytes:
{bytes, []}
succ:
let {bytes_0, head} = decoder(bytes)
let {bytes_1, tail} = RLP.decoder.repeat<A>(decoder, Nat.sub(count.pred, Nat.sub(List.length!(bytes),List.length!(bytes_0))), bytes_0)
let {bytes_1, tail} = RLP.decoder.repeat<A>(decoder, Nat.sub(count, Nat.sub(List.length!(bytes),List.length!(bytes_0))), bytes_0)
{bytes, head & tail}
}