mirror of
https://gitea.wildfiregames.com/0ad/0ad
synced 2026-06-16 05:13:58 -07: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:
parent
72be06fd7f
commit
1985fefcbd
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in a new issue