Fix integer overflow in stats output.
This commit is contained in:
parent
af382ac79c
commit
849697f84c
6
net_io.c
6
net_io.c
|
@ -816,10 +816,10 @@ static char * appendStatsJson(char *p,
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
p += snprintf(p, end-p,
|
p += snprintf(p, end-p,
|
||||||
"\"%s\":{\"start\":%d,\"end\":%d",
|
"\"%s\":{\"start\":%.1f,\"end\":%.1f",
|
||||||
key,
|
key,
|
||||||
(int)st->start,
|
st->start / 1000.0,
|
||||||
(int)st->end);
|
st->end / 1000.0);
|
||||||
|
|
||||||
if (!Modes.net_only) {
|
if (!Modes.net_only) {
|
||||||
p += snprintf(p, end-p,
|
p += snprintf(p, end-p,
|
||||||
|
|
Loading…
Reference in a new issue