From dfd962a8bc09286e426d728d65ae37bf2f122257 Mon Sep 17 00:00:00 2001 From: "Oleg A. Arkhangelsky" Date: Tue, 29 Oct 2019 21:23:42 +0300 Subject: Change type Use double type instead of float when printing time for CSV file. Float type is too small for 64 bit int time so cast corrupts value. --- example/ndpiReader.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/example/ndpiReader.c b/example/ndpiReader.c index a5481d342..b8d914d08 100644 --- a/example/ndpiReader.c +++ b/example/ndpiReader.c @@ -1011,7 +1011,7 @@ static void printFlow(u_int16_t id, struct ndpi_flow_info *flow, u_int16_t threa if(csv_fp != NULL) { float data_ratio = ndpi_data_ratio(flow->src2dst_bytes, flow->dst2src_bytes); - float f = (float)flow->first_seen, l = (float)flow->last_seen; + double f = (double)flow->first_seen, l = (double)flow->last_seen; /* PLEASE KEEP IN SYNC WITH printCSVHeader() */ -- cgit v1.2.3