]> git.saurik.com Git - wxWidgets.git/commitdiff
Corrected dangerous cast.
authorRobert Roebling <robert@roebling.de>
Sun, 11 Aug 2002 16:17:23 +0000 (16:17 +0000)
committerRobert Roebling <robert@roebling.de>
Sun, 11 Aug 2002 16:17:23 +0000 (16:17 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@16454 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

src/common/filefn.cpp

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