ignorance is bliss

Originally committed to SVN as r348.
This commit is contained in:
David Lamparter 2006-04-17 01:01:14 +00:00
parent 656beb2dc2
commit 1b81dba892
1 changed files with 4 additions and 0 deletions

View File

@ -119,6 +119,8 @@ void TextFileWriter::WriteLineToFile(wxString line,bool addLineBreak) {
// 16-bit
if (Is16) {
wxWCharBuffer buf = temp.wc_str(*conv);
if (!buf.data())
return;
size_t len = wcslen(buf.data())*2;
file.write((const char*)buf.data(),len);
}
@ -126,6 +128,8 @@ void TextFileWriter::WriteLineToFile(wxString line,bool addLineBreak) {
// 8-bit
else {
wxCharBuffer buf = temp.mb_str(*conv);
if (!buf.data())
return;
size_t len = strlen(buf.data());
file.write(buf.data(),len);
}