Fix report on 0% scratches

This commit is contained in:
Luciano Ciccariello 2024-09-25 19:47:26 +01:00
parent a1f126c396
commit d9f9d9c79c

View File

@ -72,7 +72,10 @@ def find_scratches(name, platform, local_asm=None, use_local=False):
score = result["score"]
max_score = result["max_score"]
percent = (max_score - score) / max_score
if max_score > 0:
percent = (max_score - score) / max_score
else:
percent = 0
if percent > best_percent:
best_percent = percent