aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd/planr/sub/cli.go8
1 files changed, 5 insertions, 3 deletions
diff --git a/cmd/planr/sub/cli.go b/cmd/planr/sub/cli.go
index 0e6a942..d667b88 100644
--- a/cmd/planr/sub/cli.go
+++ b/cmd/planr/sub/cli.go
@@ -116,7 +116,9 @@ func printResults(passed, tc_total int, earned, points_total float64) {
percent := earned / points_total * 100
- pprintLabeled("score", fmt.Sprintf(
- "%.2f/%.2f ~= %.1f%%", earned, points_total, percent,
- ));
+ if points_total != 0 {
+ pprintLabeled("score", fmt.Sprintf(
+ "%.2f/%.2f ~= %.1f%%", earned, points_total, percent,
+ ));
+ }
}