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 <[email protected]>
---
 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

_______________________________________________
subsurface mailing list
[email protected]
http://lists.subsurface-divelog.org/cgi-bin/mailman/listinfo/subsurface

Reply via email to