We need to start second search from the start of the buffer if \r\n
search returns nothing.

Signed-off-by: Miika Turkia <[email protected]>
---
 file.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/file.c b/file.c
index c955e9c..5772fc8 100644
--- a/file.c
+++ b/file.c
@@ -1000,6 +1000,7 @@ int parse_seabear_csv_file(const char *filename, int 
timef, int depthf, int temp
        }
 
        if (!ptr_old) {
+               ptr = mem.buffer;
                while ((ptr = strstr(ptr, "\n\n")) != NULL) {
                        ptr_old = ptr;
                        ptr += 1;
-- 
2.1.4

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

Reply via email to