From fd0ac371b0c3f555af33f040eee37bf329ec6022 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 3 Apr 2016 17:32:00 -0700 Subject: [PATCH] Fix M111 output using pgm_read_word as required As noted by @taratata2016 in https://github.com/MarlinFirmware/Marlin/issues/3300#issuecomment-204687275 --- Marlin/Marlin_main.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/Marlin_main.cpp b/Marlin/Marlin_main.cpp index 99192f4f1..896f7a155 100644 --- a/Marlin/Marlin_main.cpp +++ b/Marlin/Marlin_main.cpp @@ -4373,7 +4373,7 @@ inline void gcode_M111() { for (uint8_t i = 0; i < COUNT(debug_strings); i++) { if (TEST(marlin_debug_flags, i)) { if (comma++) SERIAL_CHAR('|'); - serialprintPGM(debug_strings[i]); + serialprintPGM((char*)pgm_read_word(&(debug_strings[i]))); } } }