Skip to content
This repository has been archived by the owner on Dec 15, 2022. It is now read-only.

Fix error message encode incorrect on win #475

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/keytar_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -108,7 +108,7 @@ std::string getErrorMessage(DWORD errorCode) {
LPWSTR errBuffer;
::FormatMessage(FORMAT_MESSAGE_ALLOCATE_BUFFER | FORMAT_MESSAGE_FROM_SYSTEM,
NULL, errorCode, 0, (LPWSTR) &errBuffer, 0, NULL);
std::string errMsg = wideCharToAnsi(errBuffer);
std::string errMsg = wideCharToUtf8(errBuffer);
LocalFree(errBuffer);
return errMsg;
}
Expand Down