From feb75f7c320f38317e9e2174277d4af26629d86a Mon Sep 17 00:00:00 2001 From: Hannes Rantzsch Date: Fri, 22 Nov 2019 15:42:40 +0700 Subject: [PATCH] fix checking user_name After converting utf8 to wchar, the wrong variable was checked, probably by copy-paste. --- src/keytar_win.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/keytar_win.cc b/src/keytar_win.cc index b548fad3..4fa82b64 100644 --- a/src/keytar_win.cc +++ b/src/keytar_win.cc @@ -123,7 +123,7 @@ KEYTAR_OP_RESULT SetPassword(const std::string& service, } LPWSTR user_name = utf8ToWideChar(account); - if (target_name == NULL) { + if (user_name == NULL) { return FAIL_ERROR; }