From 849697f84cb6d6b376573af172420bc05a671b88 Mon Sep 17 00:00:00 2001 From: Oliver Jowett Date: Wed, 11 Feb 2015 00:14:28 +0000 Subject: [PATCH] Fix integer overflow in stats output. --- net_io.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/net_io.c b/net_io.c index 59e2a29..7e1c450 100644 --- a/net_io.c +++ b/net_io.c @@ -816,10 +816,10 @@ static char * appendStatsJson(char *p, int i; p += snprintf(p, end-p, - "\"%s\":{\"start\":%d,\"end\":%d", + "\"%s\":{\"start\":%.1f,\"end\":%.1f", key, - (int)st->start, - (int)st->end); + st->start / 1000.0, + st->end / 1000.0); if (!Modes.net_only) { p += snprintf(p, end-p,