pull/877/head
Josselin 3 years ago
parent 448a92d9b6
commit aed9604c5e
  1. 4
      slither/utils/source_mapping.py
  2. 2
      tests/test_ast_parsing.py

@ -27,11 +27,11 @@ def get_definition(target: SourceMapping, crytic_compile: CryticCompile) -> Sour
start_offset = txt.find(pattern) + 1 # remove the space start_offset = txt.find(pattern) + 1 # remove the space
starting_line, starting_column = crytic_compile.get_line_and_character_from_offset( starting_line, starting_column = crytic_compile.get_line_from_offset(
target.source_mapping.filename, target.source_mapping.start + start_offset target.source_mapping.filename, target.source_mapping.start + start_offset
) )
ending_line, ending_column = crytic_compile.get_line_and_character_from_offset( ending_line, ending_column = crytic_compile.get_line_from_offset(
target.source_mapping.filename, target.source_mapping.start + start_offset + len(pattern) target.source_mapping.filename, target.source_mapping.start + start_offset + len(pattern)
) )

@ -9,10 +9,10 @@ from typing import List, Dict
from deepdiff import DeepDiff from deepdiff import DeepDiff
import pytest import pytest
from deepdiff import DeepDiff
from crytic_compile import CryticCompile, save_to_zip from crytic_compile import CryticCompile, save_to_zip
from crytic_compile.utils.zip import load_from_zip from crytic_compile.utils.zip import load_from_zip
from slither import Slither from slither import Slither
from slither.printers.guidance.echidna import Echidna from slither.printers.guidance.echidna import Echidna

Loading…
Cancel
Save