projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix the menu item bitmaps for wxMSW;
[wxWidgets.git]
/
src
/
common
/
string.cpp
diff --git
a/src/common/string.cpp
b/src/common/string.cpp
index 5729c48c65bdf035423de096875d19c46fa9846e..04a606a3c563b308768b9678347732562de43ac4 100644
(file)
--- a/
src/common/string.cpp
+++ b/
src/common/string.cpp
@@
-168,7
+168,13
@@
static wxStrCacheStatsDumper s_showCacheStats;
wxSTD ostream& operator<<(wxSTD ostream& os, const wxCStrData& str)
{
#if wxUSE_UNICODE && !wxUSE_UNICODE_UTF8
wxSTD ostream& operator<<(wxSTD ostream& os, const wxCStrData& str)
{
#if wxUSE_UNICODE && !wxUSE_UNICODE_UTF8
- return os << (const char *)str.AsCharBuf();
+ const wxCharBuffer buf(str.AsCharBuf());
+ if ( !buf )
+ os.clear(wxSTD ios_base::failbit);
+ else
+ os << buf.data();
+
+ return os;
#else
return os << str.AsInternal();
#endif
#else
return os << str.AsInternal();
#endif