Skip to content

Commit

Permalink
In convertCharPointerToStdString(), use WideCharToMultiByte() on MSYS…
Browse files Browse the repository at this point in the history
…, not just MSVC.
  • Loading branch information
AndrewBelt committed Nov 22, 2024
1 parent 1c46bdc commit 22d64cd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion RtAudio.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ std::string convertCharPointerToStdString(const wchar_t* text)
{
if (!text)
return std::string();
#if defined(_MSC_VER)
#if defined(_WIN32)
const int wchars = (int)wcslen(text);
// how many characters are required after conversion?
const int nchars = WideCharToMultiByte(CP_UTF8, 0, text, wchars, 0, 0, 0, 0);
Expand Down

0 comments on commit 22d64cd

Please sign in to comment.