From c886caedbf95d2bbbaad126b6cdc379035d36e3e Mon Sep 17 00:00:00 2001 From: Terje Io Date: Mon, 24 Jul 2023 10:30:56 +0200 Subject: [PATCH] Fixed bug in WHILE loop handling when first statement in macro. --- changelog.md | 16 +++++++++++++++- grbl.h | 2 +- ngc_flowctrl.c | 2 +- 3 files changed, 17 insertions(+), 3 deletions(-) diff --git a/changelog.md b/changelog.md index 8ef3d5b..c327041 100644 --- a/changelog.md +++ b/changelog.md @@ -1,11 +1,25 @@ ## grblHAL changelog +20230724 + +Core: + +* Fixed bug in WHILE loop handling when first statement in macro. + +Drivers: + +* iMXRT1062: added [E5XMCS_T41](https://www.makerstore.com.au/product/elec-e5xmcst41/) board. + +* RP2040: fix to allow ModBus VFDs with BTT SKR Pico board. Issue (#68)[https://github.com/grblHAL/RP2040/issues/68] + +--- + 20230718 Core: * Some tweaks for new Web Builder options++ -* Fixed regression in VFS file system handling cauing hardfault when only one mount is present. +* Fixed regression in VFS file system handling causing hardfault when only one mount is present. Plugins: diff --git a/grbl.h b/grbl.h index 7c81836..23e5e7a 100644 --- a/grbl.h +++ b/grbl.h @@ -42,7 +42,7 @@ #else #define GRBL_VERSION "1.1f" #endif -#define GRBL_BUILD 20230718 +#define GRBL_BUILD 20230724 #define GRBL_URL "https://github.com/grblHAL" diff --git a/ngc_flowctrl.c b/ngc_flowctrl.c index 394d7ca..eb21a43 100644 --- a/ngc_flowctrl.c +++ b/ngc_flowctrl.c @@ -271,7 +271,7 @@ status_code_t ngc_flowctrl (uint32_t o_label, char *line, uint_fast8_t *pos, boo case NGCFlowCtrl_While: if(hal.stream.file) { char *expr = line + *pos; - if(stack[stack_idx].brk) { + if(stack_idx >= 0 && stack[stack_idx].brk) { if(last_op == NGCFlowCtrl_Do && o_label == stack[stack_idx].o_label) stack_pull(); } else if(!skipping && (status = ngc_eval_expression(line, pos, &value)) == Status_OK) {