From fda9935c5236c3eee1e63a7c1d52c83f58d933c3 Mon Sep 17 00:00:00 2001 From: Simone Date: Mon, 19 Feb 2024 17:23:23 +0100 Subject: [PATCH] Add ENDASSEMLBY node for solc < 0.6.0 --- slither/solc_parsing/declarations/function.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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