diff --git a/.gitignore b/.gitignore index 90fe30bc..1aa2880d 100644 --- a/.gitignore +++ b/.gitignore @@ -5,4 +5,5 @@ *.d *.out commands -mnt \ No newline at end of file +mnt +programs/tsh/tsh \ No newline at end of file diff --git a/programs/tsh/src/main.cpp b/programs/tsh/src/main.cpp index c4474d8c..f92434e2 100644 --- a/programs/tsh/src/main.cpp +++ b/programs/tsh/src/main.cpp @@ -15,7 +15,7 @@ int main(){ while(true){ for(int i = 0; i < 10; ++i){ auto c = read_input(input_buffer, 63); - input_buffer[c] = '\0'; + input_buffer[c-1] = '\0'; if(str_equals(input_buffer, "exit")){ exit(0); diff --git a/programs/tsh/tsh b/programs/tsh/tsh index 4342eacf..1d5801fd 100755 Binary files a/programs/tsh/tsh and b/programs/tsh/tsh differ