Added support for building emulation in Windows.

It has not been tested but it should not break any linux build.

Signed-off-by: Pol Henarejos <pol.henarejos@cttc.es>
This commit is contained in:
Pol Henarejos
2024-01-01 01:55:49 +01:00
parent ab31a6615c
commit d82affa880
31 changed files with 394 additions and 384 deletions

View File

@@ -27,8 +27,8 @@ int cmd_challenge() {
return SW_WRONG_LENGTH();
}
memcpy(res_APDU, rb, apdu.ne);
challenge_len = MIN(apdu.ne, sizeof(challenge));
challenge_len = (uint8_t)MIN(apdu.ne, sizeof(challenge));
memcpy(challenge, rb, challenge_len);
res_APDU_size = apdu.ne;
res_APDU_size = (uint16_t)apdu.ne;
return SW_OK();
}