Return valid pointers from wxDateTime::ParseXXX() with non-wxString strings.
The pointer returned by wxDateTime::ParseXXX() methods could point into a buffer of a temporary wxString created to wrap a char* or wchar_t* argument so dereferencing it was illegal. Fix this by defining separate overloads for char*/wchar_t* arguments returning pointers into the original string. git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@70996 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -1043,6 +1043,10 @@ void DateTimeTestCase::TestDateParse()
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// Check that incomplete parse works correctly.
|
||||
const char* p = dt.ParseFormat("2012-03-23 12:34:56", "%Y-%m-%d");
|
||||
CPPUNIT_ASSERT_EQUAL( " 12:34:56", wxString(p) );
|
||||
}
|
||||
|
||||
void DateTimeTestCase::TestDateParseISO()
|
||||
|
Reference in New Issue
Block a user