From 44157bdce43cd86954c5ee97095a49984049b381 Mon Sep 17 00:00:00 2001 From: Kawe Mazidjatari <48657826+Mauler125@users.noreply.github.com> Date: Mon, 20 Jun 2022 11:21:18 +0200 Subject: [PATCH] Fix CConsole history navigation bug Fix bug where a space character gets appended on each navigation event, even if there already is a space character. --- r5dev/gameui/IConsole.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/r5dev/gameui/IConsole.cpp b/r5dev/gameui/IConsole.cpp index 3fad6384..225d6180 100644 --- a/r5dev/gameui/IConsole.cpp +++ b/r5dev/gameui/IConsole.cpp @@ -715,7 +715,7 @@ int CConsole::TextEditCallback(ImGuiInputTextCallbackData* iData) if (!svHistory.empty()) { - if (m_vsvHistory[m_nHistoryPos].find(" ") != string::npos) + if (m_vsvHistory[m_nHistoryPos].find(" ") == string::npos) { // Append whitespace to previous entered command if absent or no parameters where passed. svHistory.append(" ");