From cf762d2c7335d539aa09595ac57634ec4beee400 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Sun, 23 Jun 2019 22:21:33 -0500 Subject: [PATCH] Fix enqueueing bug --- Marlin/src/gcode/queue.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Marlin/src/gcode/queue.cpp b/Marlin/src/gcode/queue.cpp index 7dbe3259e..dbf966fb0 100644 --- a/Marlin/src/gcode/queue.cpp +++ b/Marlin/src/gcode/queue.cpp @@ -204,7 +204,7 @@ void GCodeQueue::enqueue_now_P(PGM_P const pgcode) { PGM_P p = pgcode; for (;;) { char c; - while ((c = p[i]) && c != '\n') i++; + while ((c = pgm_read_byte(&p[i])) && c != '\n') i++; char cmd[i + 1]; memcpy_P(cmd, p, i); cmd[i] = '\0';