update accepted char set

This commit is contained in:
Laila van Reenen 2024-06-11 21:22:10 +02:00
parent 34f830bd1d
commit 09ae51070b
Signed by: LailaTheElf
GPG Key ID: 1F4E6EE3E6DDF769

View File

@ -236,13 +236,7 @@ bool CLI_charIn(char c)
switch (CLI_State)
{
case CLI_State_Default:
if ( //TODO: update list of accepted characters
((C >= 'A') && (C <= 'Z'))
|| ((c >= '0') && (c <= '9'))
|| (c == ' ')
|| (c == '-')
|| (c == '_')
)
if ((C >= ' ') && (C <= '~')) // see ascii table
{
FIFOBuffChar_put(FIFO, C); // save char in buffer
CLI_charOut_save(c);
@ -265,7 +259,7 @@ bool CLI_charIn(char c)
break;
case 8:
case 127: // backspace
case 127: // delete (backspace)
if (FIFOBuffChar_pop(FIFO))
{ // pop something of the buffer
CLI_stringOut((char*)"\x1b[D \x1b[D"); // "<left arrow><space><left arrow>"