Do not assume that string propeties are file paths. Fix proper escaping in lua script generation. (#422)

This commit is contained in:
Emil Axelsson
2017-11-24 17:01:19 +01:00
committed by Alexander Bock
parent 0c18263de7
commit 13aebb78b2
+2 -2
View File
@@ -213,7 +213,7 @@ void renderStringProperty(Property* prop, const std::string& ownerName,
std::string name = p->guiName();
ImGui::PushID((ownerName + "." + name).c_str());
std::string value = FileSys.convertPathSeparator(p->value(), '/');
const std::string value = p->value();
static const int bufferSize = 256;
static char buffer[bufferSize];
@@ -235,7 +235,7 @@ void renderStringProperty(Property* prop, const std::string& ownerName,
if (hasNewValue) {
executeScript(
p->fullyQualifiedIdentifier(),
"'" + std::string(buffer) + "'",
"[[" + std::string(buffer) + "]]",
isRegular
);
}