From 1354dc596834b61c3775c2cc1b768b8e3a63b7eb Mon Sep 17 00:00:00 2001 From: bohendo Date: Mon, 27 Jan 2025 13:26:03 -0500 Subject: [PATCH] skip assembly in BOR mutator --- slither/tools/mutator/mutators/BOR.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/slither/tools/mutator/mutators/BOR.py b/slither/tools/mutator/mutators/BOR.py index fed5319ec..d6638daf8 100644 --- a/slither/tools/mutator/mutators/BOR.py +++ b/slither/tools/mutator/mutators/BOR.py @@ -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,