Commit 917a58c0 authored by Christoffer Ackelman's avatar Christoffer Ackelman

Fixed an error with CoWowRecall, when entering a new command, it replaced the...

Fixed an error with CoWowRecall, when entering a new command, it replaced the previous command at line 0
parent a1e01ff4
...@@ -93,7 +93,11 @@ void CoWowRecall::resetTmp() ...@@ -93,7 +93,11 @@ void CoWowRecall::resetTmp()
const char* CoWowRecall::popUp(const char* src) const char* CoWowRecall::popUp(const char* src)
{ {
strncpy(tmp[m_current_recall_line], src, m_line_size); if (m_current_recall_line == 0 && strcmp(src, tmp[0]) != 0) {
push(src);
} else {
strncpy(tmp[m_current_recall_line], src, m_line_size);
}
m_current_recall_line++; m_current_recall_line++;
if (m_current_recall_line > m_current_size - 1) { if (m_current_recall_line > m_current_size - 1) {
m_current_recall_line = m_current_size - 1; m_current_recall_line = m_current_size - 1;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment