DO is cleared when no data is provided.
Solves #50. Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
@@ -45,8 +45,9 @@ int cmd_put_data() {
|
||||
if (currentEF && currentEF->fid == fid) { // previously selected same EF
|
||||
ef = currentEF;
|
||||
}
|
||||
if (apdu.nc > 0 && (ef->type & FILE_DATA_FLASH)) {
|
||||
if (ef->type & FILE_DATA_FLASH) {
|
||||
int r = 0;
|
||||
if (apdu.nc > 0) {
|
||||
if (fid == EF_RC) {
|
||||
has_rc = false;
|
||||
if ((r = load_dek()) != PICOKEY_OK) {
|
||||
@@ -76,5 +77,9 @@ int cmd_put_data() {
|
||||
}
|
||||
low_flash_available();
|
||||
}
|
||||
else {
|
||||
delete_file(ef);
|
||||
}
|
||||
}
|
||||
return SW_OK();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user