Skip to content

Commit

Permalink
Allow escaped spaces in wifi ssid serial console
Browse files Browse the repository at this point in the history
  • Loading branch information
suchmememanyskill committed Aug 14, 2024
1 parent 6ebaf68 commit db01993
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions CYD-Klipper/src/ui/serial/serial_console.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ namespace serial_console
String word = "";
do
{
if (input[index] == '\t' || input[index] == ' ' || input[index] == '\n' || input[index] == '\r' || input[index] == '\0')
if (input[index] == '\t' || (input[index] == ' ' && (index <= 0 || input[index - 1] != '\\')) || input[index] == '\n' || input[index] == '\r' || input[index] == '\0')
{
if (word.length() > 0)
{
Expand All @@ -101,7 +101,11 @@ namespace serial_console
}
else
{
word += input[index];
if (input[index] != '\\')
{
word += input[index];
}

index++;
}
} while (1);
Expand Down

0 comments on commit db01993

Please sign in to comment.