diff options
| author | B. Watson <urchlay@slackware.uk> | 2025-12-11 03:22:58 -0500 |
|---|---|---|
| committer | B. Watson <urchlay@slackware.uk> | 2025-12-11 03:22:58 -0500 |
| commit | ae06ce5a0317b949a74562a09e74177e78267a9b (patch) | |
| tree | 4fbdc655afdf1edfa626874764eb63df0899cad6 /src | |
| parent | 6ad0c47dae06258fafcd7a34256494e223fbb82f (diff) | |
| download | alftools-ae06ce5a0317b949a74562a09e74177e78267a9b.tar.gz | |
alf: Avoid division by zero.
Diffstat (limited to 'src')
| -rw-r--r-- | src/alf.c | 1 |
1 files changed, 1 insertions, 0 deletions
@@ -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); } |
