Fixed a bug allowing the user to delete the shell prompt.

This commit is contained in:
2018-11-13 23:42:04 -06:00
parent a51325cd7e
commit 644e2af596
+5
View File
@@ -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';