aboutsummaryrefslogtreecommitdiffstats
path: root/wiretap/mime_file.c
diff options
context:
space:
mode:
Diffstat (limited to 'wiretap/mime_file.c')
-rw-r--r--wiretap/mime_file.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/wiretap/mime_file.c b/wiretap/mime_file.c
index 90eafcd9c0..f3a4561c09 100644
--- a/wiretap/mime_file.c
+++ b/wiretap/mime_file.c
@@ -102,7 +102,7 @@ mime_read(wtap *wth, int *err, gchar **err_info, gint64 *data_offset)
wth->phdr.ts.secs = 0;
wth->phdr.ts.nsecs = 0;
- *data_offset = wth->data_offset;
+ *data_offset = file_tell(wth->fh);
/* try to read max WTAP_MAX_PACKET_SIZE bytes */
packet_size = file_read(_buf, sizeof(_buf), wth->fh);
@@ -123,7 +123,6 @@ mime_read(wtap *wth, int *err, gchar **err_info, gint64 *data_offset)
buf = buffer_start_ptr(wth->frame_buffer);
memcpy(buf, _buf, packet_size);
- wth->data_offset += packet_size;
wth->phdr.caplen = packet_size;
wth->phdr.len = packet_size;
return TRUE;