minor fix that was part of helpbest.patch
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@11521 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
parent
619e52bf45
commit
8c5b1f0faf
@ -732,7 +732,10 @@ const wxChar *wxSysErrorMsg(unsigned long nErrCode)
|
||||
0, NULL);
|
||||
|
||||
// copy it to our buffer and free memory
|
||||
wxStrncpy(s_szBuf, (const wxChar *)lpMsgBuf, WXSIZEOF(s_szBuf) - 1);
|
||||
if( lpMsgBuf != 0 )
|
||||
wxStrncpy(s_szBuf, (const wxChar *)lpMsgBuf, WXSIZEOF(s_szBuf) - 1);
|
||||
else
|
||||
s_szBuf[0] = wxT('\0');
|
||||
s_szBuf[WXSIZEOF(s_szBuf) - 1] = wxT('\0');
|
||||
LocalFree(lpMsgBuf);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user