Fix wxWidgets assertion error on `Logging...` menu.

This commit is contained in:
Edênis Freindorfer Azevedo 2019-07-26 16:32:59 -03:00 committed by Rafael Kitover
parent c886b6a16d
commit 855db11d98
1 changed files with 3 additions and 1 deletions

View File

@ -1294,8 +1294,10 @@ bool debugWaitSocket()
void log(const char* defaultMsg, ...)
{
va_list valist;
char buf[2048];
va_start(valist, defaultMsg);
wxString msg = wxString::Format(defaultMsg, valist);
vsnprintf(buf, 2048, defaultMsg, valist);
wxString msg = wxString(buf, wxConvLibc);
va_end(valist);
wxGetApp().log.append(msg);