Skip to content
Snippets Groups Projects
Commit 02a711c4 authored by Marcio Teixeira's avatar Marcio Teixeira Committed by Scott Lahteine
Browse files

[2.0.x] Fix crash upon repeated calls to process_subcommands_now_P (#10509)

parent a3ce8a3f
No related branches found
No related tags found
No related merge requests found
......@@ -701,8 +701,7 @@ void GcodeSuite::process_next_command() {
*/
void GcodeSuite::process_subcommands_now_P(const char *pgcode) {
// Save the parser state
char saved_cmd[strlen(parser.command_ptr) + 1];
strcpy(saved_cmd, parser.command_ptr);
const char * const saved_cmd = parser.command_ptr;
// Process individual commands in string
while (pgm_read_byte_near(pgcode)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment