Skip to content

Commit

Permalink
fix decoder for strings
Browse files Browse the repository at this point in the history
stop was getting reduced by floor32(start - floor32(start)) instead of
floor32(start).
  • Loading branch information
charles-cooper committed Jan 5, 2024
1 parent 87593bb commit 4d75e78
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions boa/vyper/decoder_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ def __getitem__(self, subscript):
ret += self.db.get_storage(self.address, i).to_bytes(32, "big")
i += 1

start -= floor32(start)
stop -= floor32(start)
start_ofst = floor32(start)
start -= start_ofst
stop -= start_ofst
return memoryview(ret[start:stop])
else:
raise Exception("Must slice {self}")
Expand Down

0 comments on commit 4d75e78

Please sign in to comment.