aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/alf.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/alf.c b/src/alf.c
index 09f1d76..8eadccd 100644
--- a/src/alf.c
+++ b/src/alf.c
@@ -189,6 +189,7 @@ void convert_eols(void) {
}
int percent(unsigned int out, unsigned int in) {
+ if(!in) return 0;
return 100 - (int)((float)out / (float)in * 100.0);
}