Fix uppercasing function + swap flag issue

This commit is contained in:
TamtamHero
2020-07-09 15:56:52 +02:00
parent c2e3d75328
commit 94b501b8b2
2 changed files with 4 additions and 2 deletions

View File

@@ -15,7 +15,9 @@ void handleGetPublicKey(uint8_t p1, uint8_t p2, uint8_t *dataBuffer, uint16_t da
uint32_t i;
uint8_t bip32PathLength = *(dataBuffer++);
cx_ecfp_private_key_t privateKey;
reset_app_context();
if(!called_from_swap){
reset_app_context();
}
if ((bip32PathLength < 0x01) ||
(bip32PathLength > MAX_BIP32_PATH)) {
PRINTF("Invalid path\n");

View File

@@ -267,7 +267,7 @@ customStatus_e customProcessor(txContext_t *context) {
void to_uppercase(char* str, unsigned char size){
for (unsigned char i = 0; i < size && str[i] != 0; i++)
{
str[i] = str[i] > 'a' ? str[i] - ('a' - 'A') : str[i];
str[i] = str[i] >= 'a' ? str[i] - ('a' - 'A') : str[i];
}
}