Skip to content

Commit

Permalink
skip assembly in BOR mutator
Browse files Browse the repository at this point in the history
  • Loading branch information
bohendo committed Jan 27, 2025
1 parent 4aa141d commit 1354dc5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion slither/tools/mutator/mutators/BOR.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ def _mutate(self) -> Dict:
line_no = node.source_mapping.lines
if not line_no[0] in self.dont_mutate_line:
# Replace the expression with true
new_str = f"{old_str.split(ir.type.value)[0]}{op.value}{old_str.split(ir.type.value)[1]}"
halves = old_str.split(ir.type.value)
if len(halves) != 2:
continue # skip if assembly
new_str = f"{halves[0]}{op.value}{halves[1]}"
create_patch_with_line(
result,
self.in_file,
Expand Down

0 comments on commit 1354dc5

Please sign in to comment.