diff --git a/ngc_flowctrl.c b/ngc_flowctrl.c index eba578c..7af70eb 100644 --- a/ngc_flowctrl.c +++ b/ngc_flowctrl.c @@ -689,11 +689,13 @@ status_code_t ngc_flowctrl (uint32_t o_label, char *line, uint_fast8_t *pos, boo else if((g65_return = !!grbl.on_macro_return)) ngc_flowctrl_unwind_stack(stack[stack_idx].file); - if(ngc_eval_expression(line, pos, &value) == Status_OK) { + if(ngc_read_real_value(line, pos, &value) == Status_OK) { ngc_named_param_set("_value", value); ngc_named_param_set("_value_returned", 1.0f); - } else + } else { + ngc_named_param_set("_value", 0.0f); ngc_named_param_set("_value_returned", 0.0f); + } if(g65_return) grbl.on_macro_return();