diff options
author | van Hauser <vh@thc.org> | 2020-09-03 10:27:32 +0200 |
---|---|---|
committer | van Hauser <vh@thc.org> | 2020-09-03 10:27:32 +0200 |
commit | cea2fadbf4ca1b47be01aa1160d7a11a3a114840 (patch) | |
tree | 87ffa6e90ddc24010535622acedae2aa9a0230b7 | |
parent | 4c48d3a3ad1c0c8199b40ef47517b8a736cd5579 (diff) | |
download | afl++-cea2fadbf4ca1b47be01aa1160d7a11a3a114840.tar.gz |
fix afl-whatsup time
-rwxr-xr-x | afl-whatsup | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/afl-whatsup b/afl-whatsup index abcddbf1..e92b24bd 100755 --- a/afl-whatsup +++ b/afl-whatsup @@ -99,7 +99,7 @@ fi fmt_duration() { DUR_STRING= - if [ $1 -eq 0 ]; then + if [ $1 -le 0 ]; then return 1 fi @@ -109,7 +109,11 @@ fmt_duration() local minutes=$(((duration / 60) % 60)) local seconds=$((duration % 60)) - if [ $days -gt 0 ]; then + if [ $duration -le 0 ]; then + DUR_STRING="0 seconds" + elif [ $duration -eq 1 ]; then + DUR_STRING="1 second" + elif [ $days -gt 0 ]; then DUR_STRING="$days days, $hours hours" elif [ $hours -gt 0 ]; then DUR_STRING="$hours hours, $minutes minutes" |