From a3e3fddaf78999916228172fbf5b718b59719b7f Mon Sep 17 00:00:00 2001 From: Dirk Engling Date: Mon, 10 Feb 2014 15:36:33 +0100 Subject: Avoid div by zero when operator precedence screws up --- src/makecolumns.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src') diff --git a/src/makecolumns.sh b/src/makecolumns.sh index 476ce90..7f61ea7 100755 --- a/src/makecolumns.sh +++ b/src/makecolumns.sh @@ -49,7 +49,7 @@ do_decompress_old() { for archive in *.lha; do lha x ${archive} > /dev/null rm ${archive} - [ 1 -eq $(( ( (processed+=1) * 20 ) / numfiles > reported )) ] && printf "%d%% " $(( (reported+=1) * 5 )) + [ 1 -eq $(( ( ( (processed+=1) * 20 ) / numfiles ) > reported )) ] && printf "%d%% " $(( (reported+=1) * 5 )) done [ $reported -lt 10 ] && printf "100% " printf "done.\n" -- cgit v1.2.3