diff options
| author | Robert Günzler <r@gnzler.io> | 2020-12-07 19:57:55 +0100 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2021-01-21 19:39:13 +0100 |
| commit | 8055bc1554ef171286cf9162253a0b510f344822 (patch) | |
| tree | cf0f6475372f109e893160c7263250a120dbf0cb /bin/centercon | |
| parent | b3d9281a36dd656b1c19e3733f60794a3eaea598 (diff) | |
bin/centercon: fix arithmetic error
and also fix centercon usage in swx
Diffstat (limited to 'bin/centercon')
| -rwxr-xr-x | bin/centercon | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/bin/centercon b/bin/centercon index dff3cda..90419fd 100755 --- a/bin/centercon +++ b/bin/centercon @@ -34,7 +34,7 @@ if [ -n "$1" ] || [ ! "$1" = "-" ]; then con_width=$(awk "BEGIN{print int($con_height * $ratio)}") fi -if (( perc >= 1 )); then +if awk "BEGIN{ if (${perc} >= 1.0) exit 0; else exit 1; }"; then printf "scaling factor %.1f larger than 100%%, aborting...\n" "${perc}" exit 1 fi |