summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--text2pcap.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/text2pcap.c b/text2pcap.c
index 426e64acf3..3243410a19 100644
--- a/text2pcap.c
+++ b/text2pcap.c
@@ -950,6 +950,11 @@ parse_preamble (void)
timecode = timecode_default;
ts_usec = 0;
+ if (ts_fmt == NULL) {
+ /* Clear Preamble */
+ packet_preamble_len = 0;
+ return;
+ }
/* Ensure preamble has more than two chars before attempting to parse.
* This should cover line breaks etc that get counted.