From 2a941378e985fbb0ddd842d554a011e0b6064577 Mon Sep 17 00:00:00 2001 From: Peter Feerick Date: Mon, 13 Nov 2023 09:59:25 +1000 Subject: [PATCH] fix: Rebase issue from #4231 --- radio/src/storage/yaml/yaml_datastructs_funcs.cpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/radio/src/storage/yaml/yaml_datastructs_funcs.cpp b/radio/src/storage/yaml/yaml_datastructs_funcs.cpp index f932ad3b293..85cec0b2301 100644 --- a/radio/src/storage/yaml/yaml_datastructs_funcs.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_funcs.cpp @@ -1614,8 +1614,8 @@ static void r_customFn(void* user, uint8_t* data, uint32_t bitoffs, bool read_enable_flag = true; if (HAS_REPEAT_PARAM(func)) { // Check for 2 values to be parsed - sep = (const char *)memchr(val, ',', val_len); - if (!sep) { + uint8_t l_sep = find_sep(val, val_len); + if (!l_sep) { // only one more value - assume it is repeat read_enable_flag = false; // Set 'enabled' @@ -1627,8 +1627,7 @@ static void r_customFn(void* user, uint8_t* data, uint32_t bitoffs, // "0/1" if (val_len > 0 && read_enable_flag) { CFN_ACTIVE(cfn) = (val[0] == '1') ? 1 : 0; - sep = (const char *)memchr(val, ',', val_len); - l_sep = sep ? sep - val : val_len; + uint8_t l_sep = find_sep(val, val_len); // Skip comma before optional repeat val += l_sep;