Fixed a bug allowing the user to delete the shell prompt.
This commit is contained in:
@@ -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';
|
||||
|
||||
Reference in New Issue
Block a user