summaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
Diffstat (limited to 'file.c')
-rw-r--r--file.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/file.c b/file.c
index eacd8756a..e03edaf82 100644
--- a/file.c
+++ b/file.c
@@ -932,6 +932,13 @@ int parse_seabear_csv_file(const char *filename, int timef, int depthf, int temp
NL = "\r\n";
}
+ /*
+ * If file does not contain empty lines, it is not a valid
+ * Seabear CSV file.
+ */
+ if (!ptr)
+ return -1;
+
if (!ptr_old) {
while ((ptr = strstr(ptr, "\n\n")) != NULL) {
ptr_old = ptr;