changeset 441:9a9e4908ce2e

fix potential issue with >255 dives in the logbook
author heinrichsweikamp
date Sun, 01 Mar 2020 10:06:45 +0100 (2020-03-01)
parents 4787cd767a9d
children 2effe85f1a9b b3f684cea9c0
files Discovery/Src/externLogbookFlash.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/Discovery/Src/externLogbookFlash.c	Thu Feb 27 09:13:25 2020 +0100
+++ b/Discovery/Src/externLogbookFlash.c	Sun Mar 01 10:06:45 2020 +0100
@@ -1407,7 +1407,7 @@
   /* TODO Cleanup_Ref_1: cleanup logFlashNextSampleStartAddress and lastDiveLogId */
   /* The implementation below would cause problems in case more then 254 dives would be done. */
   /* This is avoided by Cleanup_Ref2 */
-  for(id = 0; id < 255;id++)
+  for(id = 0; id <= 255;id++)
   {
     actualAddress = HEADERSTART + (0x800 * id) + HEADER2OFFSET;
     ext_flash_read_block_start();