Skip to content

Commit

Permalink
Merge pull request #2499 from MukulKolpe/bugsByVersionLC
Browse files Browse the repository at this point in the history
Added length check on `bugs_by_version` for specific `version_number`
  • Loading branch information
0xalpharush authored Jul 2, 2024
2 parents 84e8633 + 95e153d commit 8499b5d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion slither/detectors/attributes/incorrect_solc.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ def _check_version(self, version: Tuple[str, str, str, str, str]) -> Optional[st
if op and op not in [">", ">=", "^"]:
return self.LESS_THAN_TXT
version_number = ".".join(version[2:])
if version_number in bugs_by_version:
if version_number in bugs_by_version and len(bugs_by_version[version_number]):
bugs = "\n".join([f"\t- {bug}" for bug in bugs_by_version[version_number]])
return self.BUGGY_VERSION_TXT + f"\n{bugs}"
return None
Expand Down

0 comments on commit 8499b5d

Please sign in to comment.