diff --git a/slither/solc_parsing/declarations/function.py b/slither/solc_parsing/declarations/function.py index c1b94661d..5698f7b26 100644 --- a/slither/solc_parsing/declarations/function.py +++ b/slither/solc_parsing/declarations/function.py @@ -996,7 +996,9 @@ class FunctionSolc(CallerContextExpression): if "operations" in statement: asm_node.underlying_node.add_inline_asm(statement["operations"]) link_underlying_nodes(node, asm_node) - node = asm_node + end_assembly = self._new_node(NodeType.ENDASSEMBLY, statement["src"], scope) + link_underlying_nodes(asm_node, end_assembly) + node = end_assembly elif name == "DoWhileStatement": node = self._parse_dowhile(statement, node, scope) # For Continue / Break / Return / Throw