Fix the build when implicit wxString conversions are disabled

This corrects a bug introduced in 5d256988be (Add wxMSWFormatMessage()
and use it from other places, 2021-01-09).
This commit is contained in:
Vadim Zeitlin
2021-01-11 14:18:42 +01:00
parent 000856a342
commit 3b87af5738

View File

@@ -1143,7 +1143,8 @@ wxString wxSysErrorMsgStr(unsigned long nErrCode)
const wxChar *wxSysErrorMsg(unsigned long nErrCode)
{
static wxChar s_szBuf[1024];
wxStrlcpy(s_szBuf, wxSysErrorMsgStr(nErrCode), WXSIZEOF(s_szBuf));
wxStrlcpy(s_szBuf, (const wxChar*)wxSysErrorMsgStr(nErrCode).c_str(),
WXSIZEOF(s_szBuf));
return s_szBuf;
}