mirror of https://github.com/ARMmbed/mbed-os.git
Preserve original size as it is modified inside the handler function.
The value is const reference bound inside do_paged and must not be modified, it is used inside the paging loop.pull/12446/head
parent
e850984715
commit
267d8cc223
|
|
@ -160,7 +160,8 @@ int I2CEEBlockDevice::program(const void *buffer, bd_addr_t addr, bd_size_t size
|
|||
return BD_ERROR_OK;
|
||||
};
|
||||
|
||||
return do_paged(addr, size, handler);
|
||||
auto const originalSize = size;
|
||||
return do_paged(addr, originalSize, handler);
|
||||
}
|
||||
|
||||
int I2CEEBlockDevice::erase(bd_addr_t addr, bd_size_t size)
|
||||
|
|
|
|||
Loading…
Reference in New Issue