Browse Source

Fix enqueueing bug

pull/1/head
Scott Lahteine 6 years ago
parent
commit
cf762d2c73
  1. 2
      Marlin/src/gcode/queue.cpp

2
Marlin/src/gcode/queue.cpp

@ -204,7 +204,7 @@ void GCodeQueue::enqueue_now_P(PGM_P const pgcode) {
PGM_P p = pgcode; PGM_P p = pgcode;
for (;;) { for (;;) {
char c; char c;
while ((c = p[i]) && c != '\n') i++; while ((c = pgm_read_byte(&p[i])) && c != '\n') i++;
char cmd[i + 1]; char cmd[i + 1];
memcpy_P(cmd, p, i); memcpy_P(cmd, p, i);
cmd[i] = '\0'; cmd[i] = '\0';

Loading…
Cancel
Save