Avoid reading one char beyond the buffer end in UnicodeTestCase.

Valgrind complains about reading beyond the end of buffer when using glibc
std::string for wxString implementation under amd64 Linux. Don't suppose that
the buffer has one extra null word at its end to avoid this.
This commit is contained in:
Vadim Zeitlin 2015-06-19 20:22:11 +02:00
parent 893102b926
commit 04c4e5f177

View File

@ -277,7 +277,7 @@ void UnicodeTestCase::ConversionWithNULs()
wxString szTheString2("The\0String", wxConvLocal, lenNulString);
CPPUNIT_ASSERT_EQUAL( lenNulString, szTheString2.length() );
CPPUNIT_ASSERT( wxTmemcmp(szTheString2.c_str(), L"The\0String",
lenNulString + 1) == 0 );
lenNulString) == 0 );
#else // !wxUSE_UNICODE
wxString szTheString("TheString");
szTheString.insert(3, 1, '\0');