[PATCH] Fix a bug in detecting CSV file content
Miika Turkia
miika.turkia at gmail.com
Mon Mar 30 11:57:12 PDT 2015
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 at gmail.com>
---
file.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/file.c b/file.c
index bf62a95..03eb41c 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;
--
2.1.0
More information about the subsurface
mailing list