From f3010e93ab8fdadffa0f5bbc261947fedcbc9d0c Mon Sep 17 00:00:00 2001 From: Baptiste Wicht Date: Mon, 3 Feb 2014 18:07:34 +0100 Subject: [PATCH] Update tsh --- .gitignore | 3 ++- programs/tsh/src/main.cpp | 2 +- programs/tsh/tsh | Bin 13623 -> 13623 bytes 3 files changed, 3 insertions(+), 2 deletions(-) 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 4342eacf0cbd313eb023a4250b0cb081600bb7c4..1d5801fd503f425bb16ab0b69819413e152e66ec 100755 GIT binary patch delta 14 Vcmdm