瀏覽代碼

Fix const pointer assignment compile error (#12350)

Marcio Teixeira 6 年之前
父節點
當前提交
4dbaa6369f
共有 1 個文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      Marlin/src/gcode/gcode.cpp

+ 1
- 1
Marlin/src/gcode/gcode.cpp 查看文件

753
   void GcodeSuite::process_subcommands_now(char * gcode) {
753
   void GcodeSuite::process_subcommands_now(char * gcode) {
754
     char * const saved_cmd = parser.command_ptr;        // Save the parser state
754
     char * const saved_cmd = parser.command_ptr;        // Save the parser state
755
     for (;;) {
755
     for (;;) {
756
-      const char * const delim = strchr(gcode, '\n');   // Get address of next newline
756
+      char * const delim = strchr(gcode, '\n');         // Get address of next newline
757
       if (delim) *delim = '\0';                         // Replace with nul
757
       if (delim) *delim = '\0';                         // Replace with nul
758
       parser.parse(gcode);                              // Parse the current command
758
       parser.parse(gcode);                              // Parse the current command
759
       process_parsed_command(true);                     // Process it
759
       process_parsed_command(true);                     // Process it

Loading…
取消
儲存