Skip to content

Commit

Permalink
Fix sanitizers testing error
Browse files Browse the repository at this point in the history
  • Loading branch information
rodiazet committed Dec 28, 2022
1 parent 8c041ed commit 20c499c
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions lib/evmone/eof.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -368,9 +368,8 @@ std::pair<EOFValidationError, int32_t> validate_max_stack_height(
auto target_rel_offset_hi = code[i + k * 2 + 2];
auto target_rel_offset_lo = code[i + k * 2 + 3];
auto target_rel_offset =
static_cast<uint16_t>((target_rel_offset_hi << 8) | target_rel_offset_lo);
if (target_rel_offset != 0) // Already added before the loop
successors.push_back(i + 2 * count + target_rel_offset + 2);
static_cast<int16_t>((target_rel_offset_hi << 8) | target_rel_offset_lo);
successors.push_back(static_cast<size_t>(static_cast<int32_t>(i) + 2 * count + target_rel_offset + 2));
}
}
else
Expand Down

0 comments on commit 20c499c

Please sign in to comment.