From 784bfa7b7ab921cc94e90c040922d7cd1d50feec Mon Sep 17 00:00:00 2001 From: 3djc Date: Wed, 10 May 2023 10:21:55 +0200 Subject: [PATCH] Fix function switch yaml parser --- radio/src/storage/yaml/yaml_datastructs_funcs.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/radio/src/storage/yaml/yaml_datastructs_funcs.cpp b/radio/src/storage/yaml/yaml_datastructs_funcs.cpp index dbf33647a..134b17b12 100644 --- a/radio/src/storage/yaml/yaml_datastructs_funcs.cpp +++ b/radio/src/storage/yaml/yaml_datastructs_funcs.cpp @@ -811,7 +811,7 @@ static uint32_t r_swtchSrc(const YamlNode* node, const char* val, uint8_t val_le if (val_len > 3 && val[0] == 'S' && val[1] >= 'W' && val[2] >= '0' && val[2] <= '9' - && val[3] >= '0' && val[2] <= '2') { + && val[3] >= '0' && val[3] <= '2') { ival = switchLookupIdx(val, val_len - 1) * 3; ival += yaml_str2int(val + 3, val_len - 2);