Fix writing of Record.log

Sven Eberhardt 2011-10-09 20:11:39 +02:00
parent 7390cb3fdb
commit f392a5e673
3 changed files with 4 additions and 4 deletions

View File

@ -128,7 +128,7 @@ bool LogSilent(const char *szMessage, bool fConsole)
#ifdef HAVE_ICONV
StdStrBuf Line = Languages.IconvSystem(TimeMessage.getData());
#else
StdStrBuf &Line = TimeMessage;
const StdStrBuf &Line = TimeMessage;
#endif
// Save into log file
@ -141,7 +141,7 @@ bool LogSilent(const char *szMessage, bool fConsole)
// Save into record log file, if available
if(Control.GetRecord())
{
Control.GetRecord()->GetLogFile()->Write(Line.getData(), Line.getLength());
Control.GetRecord()->GetLogFile()->Write(Line.getData(), strlen(Line.getData()));
#ifdef IMMEDIATEREC
Control.GetRecord()->GetLogFile()->Flush();
#endif

View File

@ -151,7 +151,7 @@ StdStrBuf::StdStrBuf(const wchar_t * utf16)
SetSize(len);
WideCharToMultiByte(CP_UTF8, 0, utf16, -1, getMData(), getSize(), 0, 0);
}
StdStrBuf::wchar_t_holder StdStrBuf::GetWideChar()
StdStrBuf::wchar_t_holder StdStrBuf::GetWideChar() const
{
if (!getSize()) return StdStrBuf::wchar_t_holder(NULL);

View File

@ -454,7 +454,7 @@ public:
~wchar_t_holder() { delete[] p; }
operator wchar_t * () { return p; }
};
wchar_t_holder GetWideChar();
wchar_t_holder GetWideChar() const;
StdBuf GetWideCharBuf();
#endif