summaryrefslogtreecommitdiffstats
path: root/file.c
diff options
context:
space:
mode:
authorGravatar Miika Turkia <miika.turkia@gmail.com>2015-03-30 21:57:12 +0300
committerGravatar Dirk Hohndel <dirk@hohndel.org>2015-03-30 12:55:36 -0700
commit03fc9e3c264b1b5d62af702cf755a8008469fe13 (patch)
tree982d66eed1f024bb4d14dd8ed5b9b89a9c518a01 /file.c
parentbc44dd8db1defa8db05588991fec4f40855ba44a (diff)
downloadsubsurface-03fc9e3c264b1b5d62af702cf755a8008469fe13.tar.gz
Fix a bug in detecting CSV file content
NL should be set only if there is an empty line in the input file. That way the return if no empty line exists (simplistic test for Seabear CSV file) makes more sense. Signed-off-by: Miika Turkia <miika.turkia@gmail.com> Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'file.c')
-rw-r--r--file.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/file.c b/file.c
index bf62a9590..03eb41c8d 100644
--- a/file.c
+++ b/file.c
@@ -957,9 +957,9 @@ int parse_seabear_csv_file(const char *filename, int timef, int depthf, int temp
while ((ptr = strstr(ptr, "\n\n")) != NULL) {
ptr_old = ptr;
ptr += 1;
+ NL = "\n";
}
ptr_old += 2;
- NL = "\n";
} else
ptr_old += 4;