# HG changeset patch # User heinrichsweikamp # Date 1583053605 -3600 # Node ID 9a9e4908ce2e2194357380c4b20081b18c00251a # Parent 4787cd767a9dc5fa9d48e82f98055284e3cf995b fix potential issue with >255 dives in the logbook diff -r 4787cd767a9d -r 9a9e4908ce2e Discovery/Src/externLogbookFlash.c --- 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();