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
|
else
|
||||||
{
|
{
|
||||||
|
if(strlen(commandbuffer) == 0)
|
||||||
|
{
|
||||||
|
//Do not delete the shell prompt, simply return.
|
||||||
|
return;
|
||||||
|
}
|
||||||
//Otherwise clear the last character from the command
|
//Otherwise clear the last character from the command
|
||||||
//buffer.
|
//buffer.
|
||||||
commandbuffer[len - 1] = '\0';
|
commandbuffer[len - 1] = '\0';
|
||||||
|
|||||||
Reference in New Issue
Block a user