mirror of https://github.com/ARMmbed/mbed-os.git
Fix missing offset in TBStore read from flash
This could cause incomplete data retrieval and mismatch when reading data in more than one chunk, because every chunk would be read to the same location at the beginning of the output buffer.pull/11296/head
parent
7455b89603
commit
06dd330320
|
@ -1418,7 +1418,7 @@ int TDBStore::do_reserved_data_get(void *reserved_data, size_t reserved_data_buf
|
|||
|
||||
while (actual_size) {
|
||||
uint32_t chunk = std::min(work_buf_size, (uint32_t) actual_size);
|
||||
ret = read_area(_active_area, offset, chunk, buf);
|
||||
ret = read_area(_active_area, offset, chunk, buf + offset);
|
||||
if (ret) {
|
||||
return ret;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue