Skip to content

Commit 1e1d8b0

Browse files
committed
Revert "fix(parser): handle decoding errors in source code parsing"
This reverts commit 04c860f.
1 parent a80b263 commit 1e1d8b0

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

solc_json_parser/combined_json_parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -223,7 +223,7 @@ def get_line_number_range_and_source(self, line_number_range_raw: list):
223223
source_path = self.__source_path_from_source_list(source_list, source_file_idx)
224224
source_code_bytes = self.__source_code_from_source_path(source_path).encode()
225225
start_line = source_code_bytes[:start_index].decode().count('\n') + 1
226-
end_line = start_line + source_code_bytes[start_index:start_index + offset].decode('utf-8', errors='ignore').count('\n')
226+
end_line = start_line + source_code_bytes[start_index:start_index + offset].decode().count('\n')
227227
return (start_line, end_line), source_code_bytes.decode()
228228

229229
def source_path_by_contract(self, contract_name) -> Optional[str]:

0 commit comments

Comments
 (0)