Remove escaping in negated switches (yaml-cpp does not seem to do it)
This commit is contained in:
@@ -81,12 +81,18 @@ RawSwitch YamlRawSwitchDecode(const std::string& sw_str)
|
|||||||
size_t val_len = sw_str.size();
|
size_t val_len = sw_str.size();
|
||||||
std::string sw_str_tmp = sw_str;
|
std::string sw_str_tmp = sw_str;
|
||||||
|
|
||||||
|
// yaml-cpp does not escape this
|
||||||
|
if (val_len > 0 && val[0] == '\\') {
|
||||||
|
val++; val_len--;
|
||||||
|
sw_str_tmp = sw_str_tmp.substr(1);
|
||||||
|
}
|
||||||
|
|
||||||
bool neg = false;
|
bool neg = false;
|
||||||
if (val_len > 0 && val[0] == '!') {
|
if (val_len > 0 && val[0] == '!') {
|
||||||
neg = true;
|
neg = true;
|
||||||
val++;
|
val++;
|
||||||
val_len--;
|
val_len--;
|
||||||
sw_str_tmp = sw_str.substr(1);
|
sw_str_tmp = sw_str_tmp.substr(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
int multiposcnt = Boards::getCapability(getCurrentBoard(), Board::MultiposPotsPositions);
|
int multiposcnt = Boards::getCapability(getCurrentBoard(), Board::MultiposPotsPositions);
|
||||||
|
|||||||
Reference in New Issue
Block a user