diff options
author | glerch <guido.lerch@gmail.com> | 2015-09-14 10:31:29 +0200 |
---|---|---|
committer | Dirk Hohndel <dirk@hohndel.org> | 2015-09-14 07:35:01 -0700 |
commit | 29d43531d26c0a6c178f39bee98e618f1ed23949 (patch) | |
tree | e10b3209a2edaef7531ca2bab55e7502cc226999 /uemis-downloader.c | |
parent | 1e8ea9061ec71e65e7521fd2a8714dd092b1cf7e (diff) | |
download | subsurface-29d43531d26c0a6c178f39bee98e618f1ed23949.tar.gz |
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 <guido.lerch@gmail.com>
Signed-off-by: Dirk Hohndel <dirk@hohndel.org>
Diffstat (limited to 'uemis-downloader.c')
-rw-r--r-- | uemis-downloader.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/uemis-downloader.c b/uemis-downloader.c index 9db2f33be..7e7c4fc5b 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 guido.lerch@gmx.ch in August 2015 + * Modified by Guido Lerch guido.lerch@gmail.com 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 |