mirror of
https://github.com/letscontrolit/ESPEasy.git
synced 2026-10-26 22:10:45 +00:00
[Rules] Fix endless loop on unknown {...} in rules on ESP8266
In parse_string_commands() the branch without FEATURE_EXTENDED_STRING_FUNCTIONS
masked '{' and '}' in the whole line instead of in replacement (regression from
4e191fc5b). The following line.replace() put the unmasked braces back, so
get_next_inner_bracket() found them again and the loop never ended
(SW watchdog / exception reset). Mask replacement, as before 4e191fc5b.
Fixes #5653
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
ed56769e43
commit
fbd7e43d5d
1 file changed
+2
-2
@@ -884,8 +884,8 @@ void parse_string_commands(String& line) {
|
||||
#if FEATURE_EXTENDED_STRING_FUNCTIONS
|
||||
hideMasked(replacement, mustReplaceMaskedChars); // apply
|
||||
#else // if FEATURE_EXTENDED_STRING_FUNCTIONS
|
||||
line.replace('{', static_cast<char>(0x02));
|
||||
line.replace('}', static_cast<char>(0x03));
|
||||
replacement.replace('{', static_cast<char>(0x02));
|
||||
replacement.replace('}', static_cast<char>(0x03));
|
||||
#endif // if FEATURE_EXTENDED_STRING_FUNCTIONS
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user