Some fixes for emulation.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos 2024-01-01 20:58:40 +01:00
parent d9a8826a32
commit 481cd5fd69
No known key found for this signature in database
GPG key ID: C0095B7870A4CCD3
2 changed files with 3 additions and 3 deletions

@ -1 +1 @@
Subproject commit a9dc6fd7f87fff7505ad526c7392ec1bc3a811a9
Subproject commit b663f5bebf08355ecc561c7c439ab610f685042e

View file

@ -103,8 +103,8 @@ int cmd_key_domain() {
return SW_WRONG_LENGTH();
}
if (p1 == 0x3) { //if key domain is not empty, command is denied
for (uint8_t i = 1; i < 256; i++) {
file_t *fkey = search_dynamic_file(KEY_PREFIX << 8 | i);
for (uint16_t i = 1; i < 256; i++) {
file_t *fkey = search_dynamic_file(KEY_PREFIX << 8 | (uint8_t)i);
if (get_key_domain(fkey) == p2) {
return SW_FILE_EXISTS();
}