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:
Vadim Zeitlin
2006-03-31 14:00:31 +00:00
parent 18230eb6b6
commit 44327ff375

View File

@@ -137,8 +137,10 @@ bool wxTextFile::OnRead(wxMBConv& conv)
}
const wxString str(buf, conv);
// this doesn't risk to happen in ANSI build
#if wxUSE_UNICODE
if ( str.empty() )
if ( bufSize > 4 && str.empty() )
{
wxLogError(_("Failed to convert file contents to Unicode."));
return false;