Fix console history
@@ -34,7 +34,7 @@ int Console::HandleConsoleHistory(ImGuiInputTextCallbackData* apData)
if (pConsole->m_newHistory)
{
if (!pHistory.empty())
- pHistoryStr = pHistory[pConsole->m_historyIndex];
+ pHistoryStr = pHistory.back();
}
else if (apData->EventKey == ImGuiKey_UpArrow && pConsole->m_historyIndex > 0)
{
