Fixed custom function repeat param (!1x)
This commit is contained in:
@@ -216,7 +216,7 @@ Node convert<CustomFunctionData>::encode(const CustomFunctionData& rhs)
|
|||||||
}
|
}
|
||||||
if (rhs.repeatParam == 0) {
|
if (rhs.repeatParam == 0) {
|
||||||
def += "1x";
|
def += "1x";
|
||||||
} else if (rhs.repeatParam == 0xFF) {
|
} else if (rhs.repeatParam == -1) {
|
||||||
def += "!1x";
|
def += "!1x";
|
||||||
} else {
|
} else {
|
||||||
def += std::to_string(rhs.repeatParam);
|
def += std::to_string(rhs.repeatParam);
|
||||||
@@ -350,7 +350,7 @@ bool convert<CustomFunctionData>::decode(const Node& node,
|
|||||||
if (repeat == "1x") {
|
if (repeat == "1x") {
|
||||||
rhs.repeatParam = 0;
|
rhs.repeatParam = 0;
|
||||||
} else if (repeat == "!1x") {
|
} else if (repeat == "!1x") {
|
||||||
rhs.repeatParam = 0xFF;
|
rhs.repeatParam = -1;
|
||||||
} else {
|
} else {
|
||||||
rhs.repeatParam = std::stoi(repeat);
|
rhs.repeatParam = std::stoi(repeat);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user