Skip to content

Commit

Permalink
Fix compilation warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
fbeutin-ledger committed Jul 22, 2024
1 parent b7cffc7 commit ba3ad36
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/handle_provide_parameter.c
Original file line number Diff line number Diff line change
Expand Up @@ -297,11 +297,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)) {
msg->result = ETH_PLUGIN_RESULT_ERROR;
{
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;
}
context->skip--; // Decrease by one because we wish to acces path[-1].
context->next_param = PATH;
break;
case PATH:
context->checkpoint = msg->parameterOffset;
Expand Down

0 comments on commit ba3ad36

Please sign in to comment.