Skip to content

Commit

Permalink
Fix for #53 (#54)
Browse files Browse the repository at this point in the history
  • Loading branch information
akopachov authored Jan 2, 2023
1 parent ba15840 commit 2a69aa2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion types/token_info.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ bool token_info_set_secret(
int plain_secret_length =
base32_decode((const uint8_t*)base32_token_secret, plain_secret, token_secret_length);
bool result;
if(plain_secret_length >= 0) {
if(plain_secret_length > 0) {
token_info->token =
totp_crypto_encrypt(plain_secret, plain_secret_length, iv, &token_info->token_length);
result = true;
Expand Down

0 comments on commit 2a69aa2

Please sign in to comment.