diff --git a/wiretap/commview.c b/wiretap/commview.c index 24a5e2fd63..ce5f68f42e 100644 --- a/wiretap/commview.c +++ b/wiretap/commview.c @@ -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;