mirror of
https://gitea.wildfiregames.com/0ad/0ad.git
synced 2026-06-21 01:04:06 +00:00
Fix a crash of the debug console
This fixes a crash when pyrogenesis got compiled with certain compilers, whenever a command is entered in the console, while no console.txt log exists. Fixes #7964
This commit is contained in:
@@ -578,7 +578,7 @@ void CConsole::ProcessBuffer(const wchar_t* szLine)
|
||||
|
||||
ENSURE(wcslen(szLine) < CONSOLE_BUFFER_SIZE);
|
||||
|
||||
if (!m_HistoryIgnoreDuplicates || m_BufHistory.front() != szLine)
|
||||
if (!m_HistoryIgnoreDuplicates || m_BufHistory.empty() || m_BufHistory.front() != szLine)
|
||||
{
|
||||
m_BufHistory.push_front(szLine);
|
||||
SaveHistory(); // Do this each line for the moment; if a script causes
|
||||
|
||||
Reference in New Issue
Block a user