Skip to content

Commit

Permalink
Fix Malyan LCD crash bug (MarlinFirmware#17855)
Browse files Browse the repository at this point in the history
  • Loading branch information
mojocorp authored and Emmanuel Viala committed Aug 21, 2020
1 parent 7b3a1ab commit 68d07ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Marlin/src/lcd/extui_malyan_lcd.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,12 +378,12 @@ void parse_lcd_byte(const byte b) {
|| (!is_lcd && c == '\n') // LF on a G-code command
) {
inbound_buffer[inbound_count] = '\0'; // Reset before processing
parsing = 0; // Unflag and...
inbound_count = 0; // Reset buffer index
if (parsing == 1)
process_lcd_command(inbound_buffer); // Handle the LCD command
else
queue.enqueue_one_now(inbound_buffer); // Handle the G-code command
parsing = 0; // Unflag and...
}
else if (inbound_count < MAX_CURLY_COMMAND - 2)
inbound_buffer[inbound_count++] = is_lcd ? c : b; // Buffer while space remains
Expand Down

0 comments on commit 68d07ab

Please sign in to comment.