From ae06ce5a0317b949a74562a09e74177e78267a9b Mon Sep 17 00:00:00 2001 From: "B. Watson" Date: Thu, 11 Dec 2025 03:22:58 -0500 Subject: alf: Avoid division by zero. --- src/alf.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src') 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); } -- cgit v1.2.3