about summary refs log tree commit diff
path: root/src/afl-common.c
diff options
context:
space:
mode:
authorvan Hauser <vh@thc.org>2020-12-26 13:15:05 +0100
committervan Hauser <vh@thc.org>2020-12-26 13:15:05 +0100
commit0b9ca807f2a5e1ef6f43a8cb95356ed21ba3a3e5 (patch)
treec7f89eacf98df180ae310bc0315a7182f5594025 /src/afl-common.c
parenta4fd4ea0f46529feb09577a13cc7c053fb22146f (diff)
downloadafl++-0b9ca807f2a5e1ef6f43a8cb95356ed21ba3a3e5.tar.gz
fix exec/s display
Diffstat (limited to 'src/afl-common.c')
-rw-r--r--src/afl-common.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/afl-common.c b/src/afl-common.c
index 7914f83a..1928663d 100644
--- a/src/afl-common.c
+++ b/src/afl-common.c
@@ -630,6 +630,10 @@ u8 *stringify_float(u8 *buf, size_t len, double val) {
 
     snprintf(buf, len, "%0.01f", val);
 
+  } else if (unlikely(isnan(val) || isinf(val))) {
+
+    strcpy(buf, "inf");
+
   } else {
 
     stringify_int(buf, len, (u64)val);
@@ -789,9 +793,9 @@ u8 *u_stringify_float(u8 *buf, double val) {
 
     sprintf(buf, "%0.01f", val);
 
-  } else if (unlikely(isnan(val) || isfinite(val))) {
+  } else if (unlikely(isnan(val) || isinf(val))) {
 
-    strcpy(buf, "999.9");
+    strcpy(buf, "infinite");
 
   } else {