From 28345b2fbdb96c03c3f6d844b542da9c131b3276 Mon Sep 17 00:00:00 2001 From: MX <10697207+xMasterX@users.noreply.github.com> Date: Tue, 3 Jan 2023 18:41:22 +0300 Subject: [PATCH] Update TOTP https://github.com/akopachov/flipper-zero_authenticator --- applications/plugins/totp/types/token_info.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/applications/plugins/totp/types/token_info.c b/applications/plugins/totp/types/token_info.c index b9d22808d..b43293788 100644 --- a/applications/plugins/totp/types/token_info.c +++ b/applications/plugins/totp/types/token_info.c @@ -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;