Просмотр исходного кода

If no command is found print info

Johannes Zellner 8 месяцев назад
Родитель
Сommit
7c3e9d02ab
1 измененных файлов с 6 добавлено и 0 удалено
  1. 6 0
      terminal.c

+ 6 - 0
terminal.c

@@ -237,6 +237,12 @@ void terminal_run(void)
 						io_putstr("drive ");
 						io_putchar((char)('0' + disk_get_drive()));
 						io_putstr(" selected\n");
+					} else {
+						unsigned int i = 0;
+						while (i < line_len && line[i] == ' ')
+							i++;
+						if (i < line_len)
+							io_putstr("command not found\n");
 					}
 					line_len  = 0;
 					line_pos  = 0;