Browse Source

Fix M117 string offset

Yuri D'Elia 2 years ago
parent
commit
74609009ca
1 changed files with 2 additions and 2 deletions
  1. 2 2
      Firmware/Marlin_main.cpp

+ 2 - 2
Firmware/Marlin_main.cpp

@@ -6554,8 +6554,8 @@ Sigma_Exit:
     ### M117 - Display Message <a href="https://reprap.org/wiki/G-code#M117:_Display_Message">M117: Display Message</a>
     ### M117 - Display Message <a href="https://reprap.org/wiki/G-code#M117:_Display_Message">M117: Display Message</a>
     */
     */
     case 117: {
     case 117: {
-        const char *src = strchr_pointer;
-        lcd_setstatus(*src? src + 1: src);
+        const char *src = strchr_pointer + 4; // "M117"
+        lcd_setstatus(*src == ' '? src + 1: src);
         custom_message_type = CustomMsg::M117;
         custom_message_type = CustomMsg::M117;
     }
     }
     break;
     break;