Explorar o código

[Finsh] Fix command line size issue in finsh.

bernard %!s(int64=10) %!d(string=hai) anos
pai
achega
f44f6caadb
Modificáronse 1 ficheiros con 6 adicións e 0 borrados
  1. 6 0
      components/finsh/shell.c

+ 6 - 0
components/finsh/shell.c

@@ -530,6 +530,12 @@ void finsh_thread_entry(void* parameter)
             ch = 0;
             shell->line_position ++;
             shell->line_curpos++;
+			if (shell->line_position >= 80) 
+			{
+				/* clear command line */
+				shell->line_position = 0;
+				shell->line_curpos = 0;
+			}
         } /* end of device read */
     }
 }