From 811354b9327963f7c6767aac4b80bcc1d50a2f1a Mon Sep 17 00:00:00 2001 From: Steffen Moeller Date: Tue, 24 Feb 2026 01:19:42 +0000 Subject: [PATCH 1/2] canterp: fix parsing of ORIENT_SPINDLE --- src/emc/canterp/canterp.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/emc/canterp/canterp.cc b/src/emc/canterp/canterp.cc index e57cb8193a9..f69ed41683c 100644 --- a/src/emc/canterp/canterp.cc +++ b/src/emc/canterp/canterp.cc @@ -590,11 +590,11 @@ int Canterp::execute(const char *line) { return INTERP_ERROR; } if (!strcmp(s1, "CANON_CLOCKWISE")) { - ORIENT_SPINDLE(i1, d2, CANON_CLOCKWISE); + ORIENT_SPINDLE(i1, d1, CANON_CLOCKWISE); return 0; } if (!strcmp(s1, "CANON_COUNTERCLOCKWISE")) { - ORIENT_SPINDLE(i1, d2, CANON_COUNTERCLOCKWISE); + ORIENT_SPINDLE(i1, d1, CANON_COUNTERCLOCKWISE); return 0; } return INTERP_ERROR; From 4f3477ad725c06a717c420d3df6dbf82e2b71ee2 Mon Sep 17 00:00:00 2001 From: Steffen Moeller Date: Tue, 24 Feb 2026 01:33:49 +0000 Subject: [PATCH 2/2] canterp: fix scanf with 9 vals checked against 6 --- src/emc/canterp/canterp.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/emc/canterp/canterp.cc b/src/emc/canterp/canterp.cc index f69ed41683c..5145901c8c2 100644 --- a/src/emc/canterp/canterp.cc +++ b/src/emc/canterp/canterp.cc @@ -299,7 +299,7 @@ int Canterp::execute(const char *line) { } if (!strcmp(the_command_name, "STRAIGHT_PROBE")) { - if (6 != sscanf(the_command_args, "%lf %lf %lf %lf %lf %lf %lf %lf %lf", + if (9 != sscanf(the_command_args, "%lf %lf %lf %lf %lf %lf %lf %lf %lf", &d1, &d2, &d3, &d4, &d5, &d6, &d7, &d8, &d9)) { return INTERP_ERROR; } @@ -325,7 +325,7 @@ int Canterp::execute(const char *line) { #if 0 if (!strcmp(the_command_name, "SET_ORIGIN_OFFSETS")) { - if (6 != sscanf(the_command_args, "%lf %lf %lf %lf %lf %lf %lf %lf %lf", + if (9 != sscanf(the_command_args, "%lf %lf %lf %lf %lf %lf %lf %lf %lf", &d1, &d2, &d3, &d4, &d5, &d6, &d7, &d8, &d9)) { return INTERP_ERROR; } @@ -389,7 +389,7 @@ int Canterp::execute(const char *line) { #if 0 if (!strcmp(the_command_name, "USE_TOOL_LENGTH_OFFSET")) { - if (1 != sscanf(the_command_args, "%lf %lf %lf", &d1, &d2, &d3)) { + if (3 != sscanf(the_command_args, "%lf %lf %lf", &d1, &d2, &d3)) { return INTERP_ERROR; } USE_TOOL_LENGTH_OFFSET(d1, d2, d3);