Set credential type to none when reading from file

This commit is contained in:
Eric Betts
2023-07-16 18:29:49 -07:00
parent 6982b4533b
commit ffda9de789
+3
View File
@@ -54,6 +54,7 @@ static bool seader_credential_load(SeaderCredential* cred, FuriString* path, boo
FuriString* temp_str;
temp_str = furi_string_alloc();
bool deprecated_version = false;
cred->type = SeaderCredentialTypeNone;
if(cred->loading_cb) {
cred->loading_cb(cred->loading_cb_ctx, true);
@@ -370,6 +371,8 @@ void seader_credential_clear(SeaderCredential* cred) {
cred->credential = 0;
cred->bit_length = 0;
cred->type = SeaderCredentialTypeNone;
memset(cred->sio, 0, sizeof(cred->sio));
memset(cred->diversifier, 0, sizeof(cred->diversifier));
furi_string_reset(cred->load_path);
}