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.
This commit is contained in:
Oleg A. Arkhangelsky
2019-10-29 21:23:42 +03:00
parent d2f04f5bdf
commit dfd962a8bc
+1 -1
View File
@@ -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() */