Fix potential YAML format issue by enclosing "def" value in double quotes
This commit is contained in:
@@ -840,6 +840,7 @@ bool w_customFn(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
|
||||
const char* str = nullptr;
|
||||
bool add_comma = true;
|
||||
if (!wf(opaque, "\"", 1)) return false;
|
||||
|
||||
switch (func) {
|
||||
case FUNC_OVERRIDE_CHANNEL:
|
||||
@@ -973,6 +974,7 @@ bool w_customFn(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
if (!wf(opaque, str, strlen(str))) return false;
|
||||
}
|
||||
}
|
||||
if (!wf(opaque, "\"", 1)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -986,6 +988,7 @@ bool w_logicSw(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
{
|
||||
data += bitoffs >> 3UL;
|
||||
data -= sizeof(LogicalSwitchData::func);
|
||||
if (!wf(opaque,"\"",1)) return false;
|
||||
|
||||
const char* str = nullptr;
|
||||
auto ls = reinterpret_cast<LogicalSwitchData*>(data);
|
||||
@@ -1037,6 +1040,7 @@ bool w_logicSw(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
break;
|
||||
}
|
||||
|
||||
if (!wf(opaque,"\"",1)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
@@ -1306,6 +1306,7 @@ static bool w_customFn(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
|
||||
const char* str = nullptr;
|
||||
bool add_comma = true;
|
||||
if (!wf(opaque, "\"", 1)) return false;
|
||||
|
||||
switch (func) {
|
||||
case FUNC_OVERRIDE_CHANNEL:
|
||||
@@ -1439,6 +1440,7 @@ static bool w_customFn(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
if (!wf(opaque, str, strlen(str))) return false;
|
||||
}
|
||||
}
|
||||
if (!wf(opaque, "\"", 1)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
@@ -1531,6 +1533,7 @@ static bool w_logicSw(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
{
|
||||
data += bitoffs >> 3UL;
|
||||
data -= sizeof(LogicalSwitchData::func);
|
||||
if (!wf(opaque,"\"",1)) return false;
|
||||
|
||||
const char* str = nullptr;
|
||||
auto ls = reinterpret_cast<LogicalSwitchData*>(data);
|
||||
@@ -1582,6 +1585,7 @@ static bool w_logicSw(void* user, uint8_t* data, uint32_t bitoffs,
|
||||
break;
|
||||
}
|
||||
|
||||
if (!wf(opaque,"\"",1)) return false;
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user