mirror of
https://github.com/polhenarejos/pico-hsm.git
synced 2026-04-17 21:58:27 +00:00
Fix returning EOF when reading an element outside the size.
Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
parent
405bf92e18
commit
f22f58f983
1 changed files with 1 additions and 1 deletions
|
|
@ -85,7 +85,7 @@ int cmd_read_binary() {
|
|||
else {
|
||||
uint16_t data_len = file_get_size(ef);
|
||||
if (offset > data_len) {
|
||||
return SW_WRONG_P1P2();
|
||||
return SW_WARNING_EOF();
|
||||
}
|
||||
|
||||
uint16_t maxle = data_len - offset;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue