diff --git a/src/shell.c b/src/shell.c index 13b1944..fa9a2d0 100644 --- a/src/shell.c +++ b/src/shell.c @@ -25,6 +25,11 @@ void key_pressed(unsigned char* character) } else { + if(strlen(commandbuffer) == 0) + { + //Do not delete the shell prompt, simply return. + return; + } //Otherwise clear the last character from the command //buffer. commandbuffer[len - 1] = '\0';