]> git.saurik.com Git - wxWidgets.git/commitdiff
wxString(const unsigned char *) ctor doesn't crash by default with wxUSE_STL==1 any...
authorVadim Zeitlin <vadim@wxwidgets.org>
Tue, 8 Nov 2005 01:10:02 +0000 (01:10 +0000)
committerVadim Zeitlin <vadim@wxwidgets.org>
Tue, 8 Nov 2005 01:10:02 +0000 (01:10 +0000)
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@36120 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775

include/wx/string.h

index 4cd3a70575c28813eb4084011c523c1d17095cde..370fdc45bf8edf34d3a675e077db4758e330e580 100644 (file)
@@ -671,7 +671,10 @@ public:
   wxString(const wxWCharBuffer& psz) : wxStringBase(psz.data()) { }
 #else // ANSI
     // from C string (for compilers using unsigned char)
-  wxString(const unsigned char* psz, size_t nLength = npos)
+  wxString(const unsigned char* psz)
+      : wxStringBase((const char*)psz) { }
+    // from part of C string (for compilers using unsigned char)
+  wxString(const unsigned char* psz, size_t nLength)
       : wxStringBase((const char*)psz, nLength) { }
 
 #if wxUSE_WCHAR_T