Skip to content

Commit

Permalink
Merge pull request #27 from LedgerHQ/fbe/flex_support_p2 (B2CA-1689)
Browse files Browse the repository at this point in the history
Fix compilation warnings
  • Loading branch information
tdejoigny-ledger authored Jul 22, 2024
2 parents b7cffc7 + 77bef7d commit 72f6022
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/handle_provide_parameter.c
Original file line number Diff line number Diff line change
Expand Up @@ -296,13 +296,15 @@ static void handle_megaswap(ethPluginProvideParameter_t *msg, paraswap_parameter
}
context->next_param = PATHS_LEN;
break;
case PATHS_LEN:
if (!U2BE_from_parameter(msg->parameter, &context->skip)) {
case PATHS_LEN: {
uint16_t skip;
if (!U2BE_from_parameter(msg->parameter, &skip)) {
msg->result = ETH_PLUGIN_RESULT_ERROR;
}
context->skip = (uint8_t) skip;
context->skip--; // Decrease by one because we wish to acces path[-1].
context->next_param = PATH;
break;
} break;
case PATH:
context->checkpoint = msg->parameterOffset;
if (!U2BE_from_parameter(msg->parameter, &context->offset)) {
Expand Down

0 comments on commit 72f6022

Please sign in to comment.