Corrected dangerous cast.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16454 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Robert Roebling 2002-08-11 16:17:23 +00:00
parent b1ac3b56e6
commit c35c94f6cd

View File

@ -1415,8 +1415,11 @@ wxChar *wxGetWorkingDirectory(wxChar *buf, int sz)
bool needsANSI = TRUE; bool needsANSI = TRUE;
#if !defined(HAVE_WGETCWD) || wxUSE_UNICODE_MSLU #if !defined(HAVE_WGETCWD) || wxUSE_UNICODE_MSLU
wxCharBuffer c_buffer(sz); // This is not legal code as the compiler
char *cbuf = (char*)(const char*)c_buffer; // is allowed destroy the wxCharBuffer.
// wxCharBuffer c_buffer(sz);
// char *cbuf = (char*)(const char*)c_buffer;
char cbuf[_MAXPATHLEN];
#endif #endif
#ifdef HAVE_WGETCWD #ifdef HAVE_WGETCWD