mirror of
https://github.com/suchmememanyskill/CYD-Klipper.git
synced 2026-03-21 05:33:24 +00:00
Allow escaped spaces in wifi ssid serial console
This commit is contained in:
@@ -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)
|
||||
{
|
||||
@@ -100,8 +100,12 @@ namespace serial_console
|
||||
index++;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (input[index] != '\\')
|
||||
{
|
||||
word += input[index];
|
||||
}
|
||||
|
||||
index++;
|
||||
}
|
||||
} while (1);
|
||||
|
||||
Reference in New Issue
Block a user