Skip to content
Snippets Groups Projects
Commit cf762d2c authored by Scott Lahteine's avatar Scott Lahteine
Browse files

Fix enqueueing bug

parent 12d21e64
Branches
Tags
Loading
...@@ -204,7 +204,7 @@ void GCodeQueue::enqueue_now_P(PGM_P const pgcode) { ...@@ -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';
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment