diff --git a/slither/detectors/attributes/incorrect_solc.py b/slither/detectors/attributes/incorrect_solc.py index 532a96493..e60412cef 100644 --- a/slither/detectors/attributes/incorrect_solc.py +++ b/slither/detectors/attributes/incorrect_solc.py @@ -71,7 +71,7 @@ Consider using the latest version of Solidity for testing.""" 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