Skip to content

Commit

Permalink
sprintf
Browse files Browse the repository at this point in the history
  • Loading branch information
xtruan committed Mar 2, 2023
1 parent bb4832a commit c681b3b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions views/flipbip39_scene_1.c
Original file line number Diff line number Diff line change
Expand Up @@ -104,10 +104,10 @@ static void flipbip39_scene_1_model_init(FlipBip39Scene1Model* const model, cons
// WIP / TODO: Generate a seed from the mnemonic
uint8_t seed[64];
mnemonic_to_seed(mnemonic, "", seed, 0);
char *seedptr = malloc(64*2 + 1);
char *seedptr = malloc(64 * 2 + 1);

for (size_t i = 0; i < 64; i++) {
sprintf(seedptr + (i * 2), "%.2x", seed[i]);
snprintf(seedptr + (i * 2), 2, "%.2x", seed[i]);
}

//strcpy(seedptr, (char*)seed);
Expand Down

0 comments on commit c681b3b

Please sign in to comment.