Skip to content

Commit

Permalink
fix incorrect iterator use
Browse files Browse the repository at this point in the history
  • Loading branch information
HarukaMa committed Oct 28, 2023
1 parent 4687291 commit ce44984
Showing 1 changed file with 8 additions and 5 deletions.
13 changes: 8 additions & 5 deletions aleo_types/vm_instruction.py
Original file line number Diff line number Diff line change
Expand Up @@ -754,11 +754,14 @@ def load(cls, data: BytesIO):
element_type=plaintext_type,
length=next(lengths),
)
while lengths:
array = ArrayType(
element_type=ArrayPlaintextType(array_type=array),
length=next(lengths),
)
try:
while True:
array = ArrayType(
element_type=ArrayPlaintextType(array_type=array),
length=next(lengths),
)
except StopIteration:
pass
return array

class ArrayPlaintextType(PlaintextType):
Expand Down

0 comments on commit ce44984

Please sign in to comment.