Put the year field of the timestamp out in little-endian byte order.

Change-Id: I9de300b05e8d66e71359241fddfe10d90f3f8d33
Reviewed-on: https://code.wireshark.org/review/34454
Petri-Dish: Guy Harris <guy@alum.mit.edu>
Tested-by: Petri Dish Buildbot
Reviewed-by: Guy Harris <guy@alum.mit.edu>
This commit is contained in:
Guy Harris 2019-09-04 13:27:45 -07:00
parent d58f8f57c1
commit 05e39afb3f
1 changed files with 2 additions and 2 deletions

View File

@ -416,7 +416,7 @@ static gboolean commview_dump(wtap_dumper *wdh,
tm = localtime(&rec->ts.secs);
if (tm != NULL) {
cv_hdr.year = tm->tm_year + 1900;
cv_hdr.year = GUINT16_TO_LE(tm->tm_year + 1900);
cv_hdr.month = tm->tm_mon + 1;
cv_hdr.day = tm->tm_mday;
cv_hdr.hours = tm->tm_hour;
@ -427,7 +427,7 @@ static gboolean commview_dump(wtap_dumper *wdh,
/*
* Second before the Epoch.
*/
cv_hdr.year = 1969;
cv_hdr.year = GUINT16_TO_LE(1969);
cv_hdr.month = 12;
cv_hdr.day = 31;
cv_hdr.hours = 23;