mirror of
https://github.com/LedgerHQ/openpgp-card-app
synced 2024-11-09 07:10:30 +00:00
Clear return buffer in case of error
This commit is contained in:
parent
ae8d1f7607
commit
6541cf32f8
@ -50,6 +50,9 @@ void app_main(void) {
|
|||||||
sw = gpg_dispatch();
|
sw = gpg_dispatch();
|
||||||
if (sw) {
|
if (sw) {
|
||||||
PRINTF("[MAIN] - FINALLY INSERT sw=0x%x\n", sw);
|
PRINTF("[MAIN] - FINALLY INSERT sw=0x%x\n", sw);
|
||||||
|
if ((sw != SW_OK) && ((sw & 0xFF00) != SW_CORRECT_BYTES_AVAILABLE)) {
|
||||||
|
gpg_io_discard(1);
|
||||||
|
}
|
||||||
gpg_io_insert_u16(sw);
|
gpg_io_insert_u16(sw);
|
||||||
io_flags = 0;
|
io_flags = 0;
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user