forked from Mirrors/openclonk
Fix writing of Record.log
parent
7390cb3fdb
commit
f392a5e673
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
Loading…
Reference in New Issue