From 6f08c0fcb8e4d36f26a29af7cb55b88cdf6cf86a Mon Sep 17 00:00:00 2001 From: George Fu Date: Fri, 29 Jan 2021 09:22:08 +0800 Subject: [PATCH] Fix SSID or password blank issue --- gcode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gcode.cpp b/gcode.cpp index 18bd4e4..77faffb 100644 --- a/gcode.cpp +++ b/gcode.cpp @@ -100,7 +100,7 @@ void Gcode::get_serial_commands() { * M50: Set the Wifi ssid */ void Gcode::gcode_M50() { - for (char *fn = parser.string_arg; *fn; ++fn) if (*fn == ' ') *fn = '\0'; + for (char *fn = parser.string_arg; *fn; ++fn); config.ssid(parser.string_arg); SERIAL_ECHO("ssid:"); SERIAL_ECHOLN(config.ssid());