From d8695f3a362e767e3b6065f42628a8652b42e7ea Mon Sep 17 00:00:00 2001 From: Josselin Date: Fri, 9 Jul 2021 11:45:33 +0200 Subject: [PATCH] Use crytic_compile.get_line_and_character_from_offset Synchronize with https://github.com/crytic/crytic-compile/pull/201 --- slither/core/source_mapping/source_mapping.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/slither/core/source_mapping/source_mapping.py b/slither/core/source_mapping/source_mapping.py index 9d18dd50cf..733bfa30eb 100644 --- a/slither/core/source_mapping/source_mapping.py +++ b/slither/core/source_mapping/source_mapping.py @@ -37,10 +37,10 @@ def _compute_line( Not done in an efficient way """ - start_line, starting_column = compilation_unit.core.crytic_compile.get_line_from_offset( + start_line, starting_column = compilation_unit.core.crytic_compile.get_line_and_character_from_offset( filename, start ) - end_line, ending_column = compilation_unit.core.crytic_compile.get_line_from_offset( + end_line, ending_column = compilation_unit.core.crytic_compile.get_line_and_character_from_offset( filename, start + length ) return list(range(start_line, end_line + 1)), starting_column, ending_column