mirror of
https://github.com/OpenSpace/OpenSpace.git
synced 2026-05-02 16:59:37 -05:00
Do not assume that string propeties are file paths. Fix proper escaping in lua script generation. (#422)
This commit is contained in:
committed by
Alexander Bock
parent
0c18263de7
commit
13aebb78b2
@@ -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
|
||||
);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user