Browse Source

Fix Malyan LCD crash bug (#17855)

mojocorp 5 years ago
parent
commit
1c32f10039
No account linked to committer's email address
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      Marlin/src/lcd/extui_malyan_lcd.cpp

+ 1
- 1
Marlin/src/lcd/extui_malyan_lcd.cpp View File

378
       || (!is_lcd && c == '\n')                 // LF on a G-code command
378
       || (!is_lcd && c == '\n')                 // LF on a G-code command
379
     ) {
379
     ) {
380
       inbound_buffer[inbound_count] = '\0';     // Reset before processing
380
       inbound_buffer[inbound_count] = '\0';     // Reset before processing
381
-      parsing = 0;                              // Unflag and...
382
       inbound_count = 0;                        // Reset buffer index
381
       inbound_count = 0;                        // Reset buffer index
383
       if (parsing == 1)
382
       if (parsing == 1)
384
         process_lcd_command(inbound_buffer);    // Handle the LCD command
383
         process_lcd_command(inbound_buffer);    // Handle the LCD command
385
       else
384
       else
386
         queue.enqueue_one_now(inbound_buffer);  // Handle the G-code command
385
         queue.enqueue_one_now(inbound_buffer);  // Handle the G-code command
386
+      parsing = 0;                              // Unflag and...
387
     }
387
     }
388
     else if (inbound_count < MAX_CURLY_COMMAND - 2)
388
     else if (inbound_count < MAX_CURLY_COMMAND - 2)
389
       inbound_buffer[inbound_count++] = is_lcd ? c : b; // Buffer while space remains
389
       inbound_buffer[inbound_count++] = is_lcd ? c : b; // Buffer while space remains

Loading…
Cancel
Save