-- 
Best regards,
Guido
From 75eedcfa1b3f3e57cf667661ca08bf6e52349c1b Mon Sep 17 00:00:00 2001
From: glerch <[email protected]>
Date: Mon, 14 Sep 2015 10:31:29 +0200
Subject: [PATCH 3/3] Uemis bugfix

Fixed a bug in do_uemis_download when cleaning up delted dives. My
test for valid dives was wrong. now counting the nr of dives in the
download table.

Signed-off-by: glerch <[email protected]>
---
 uemis-downloader.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/uemis-downloader.c b/uemis-downloader.c
index 9db2f33..7e7c4fc 100644
--- a/uemis-downloader.c
+++ b/uemis-downloader.c
@@ -10,7 +10,7 @@
  * Zurich) but did not actually use any of his copyrighted code, therefore the 
license under which
  * he released his code does not apply to this new implementation in C
  *
- * Modified by Guido Lerch [email protected] in August 2015
+ * Modified by Guido Lerch [email protected] in August 2015
  */
 #include <fcntl.h>
 #include <dirent.h>
@@ -1301,7 +1301,7 @@ const char *do_uemis_import(device_data_t *data)
        /* Regardless on where we are with the memory situation, it's time now
         * to see if we have to clean some dead bodies from our download table 
*/
        next_table_index = 0;
-       while (data->download_table->dives[next_table_index]) {
+       while (next_table_index < data->download_table->nr) {
                if (!data->download_table->dives[next_table_index]->downloaded)
                        uemis_delete_dive(data, 
data->download_table->dives[next_table_index]->dc.diveid);
                else
-- 
1.9.5 (Apple Git-50.3)

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

Reply via email to