Skip to content

Commit

Permalink
Merge pull request #2664 from Jayakumar2812/fix-2524
Browse files Browse the repository at this point in the history
 Fixes issue 2524, Slot Calculation for Variables that Cross 32-Byte
  • Loading branch information
smonicas authored Feb 21, 2025
2 parents f0eb2bb + 0abe772 commit b392536
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 2 deletions.
2 changes: 1 addition & 1 deletion slither/tools/read_storage/read_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -582,7 +582,7 @@ def _find_struct_var_slot(
var_type = var.type
if isinstance(var_type, ElementaryType):
size = var_type.size
if offset >= 256:
if size > (256 - offset):
slot += 1
offset = 0
if struct_var == var.name:
Expand Down
Loading

0 comments on commit b392536

Please sign in to comment.