Skip to content

Commit

Permalink
Added length check on bugs_by_version for specific version_number
Browse files Browse the repository at this point in the history
  • Loading branch information
MukulKolpe committed Jun 27, 2024
1 parent 798c1f6 commit 95e153d
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 95e153d

Please sign in to comment.