don't give error when reading empty file in Unicode build
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@38466 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -137,8 +137,10 @@ bool wxTextFile::OnRead(wxMBConv& conv)
|
|||||||
}
|
}
|
||||||
|
|
||||||
const wxString str(buf, conv);
|
const wxString str(buf, conv);
|
||||||
|
|
||||||
|
// this doesn't risk to happen in ANSI build
|
||||||
#if wxUSE_UNICODE
|
#if wxUSE_UNICODE
|
||||||
if ( str.empty() )
|
if ( bufSize > 4 && str.empty() )
|
||||||
{
|
{
|
||||||
wxLogError(_("Failed to convert file contents to Unicode."));
|
wxLogError(_("Failed to convert file contents to Unicode."));
|
||||||
return false;
|
return false;
|
||||||
|
Reference in New Issue
Block a user