Skip to content

Commit

Permalink
Escape double quotes in UDMF string values when saving
Browse files Browse the repository at this point in the history
Fixes #1453

Also added some missing defaults for UDMF properties
  • Loading branch information
sirjuddington committed Mar 30, 2023
1 parent 28895c5 commit d532bce
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
6 changes: 5 additions & 1 deletion dist/res/config/ports/include/props_zdoom.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -893,11 +893,13 @@ udmf_properties
{
name = "Pitch";
type = int;
default = 0;
}
property roll
{
name = "Roll";
type = int;
default = 0;
}
property scale
{
Expand Down Expand Up @@ -1025,14 +1027,16 @@ udmf_properties
{
name = "Render Style";
type = string;
values="", "Normal", "None", "Add", "Subtract", "Stencil", "AddStencil", "TranslucentStencil", "Translucent", "Fuzzy", "OptFuzzy", "Soultrans", "Shaded", "AddShaded", "Shadow";
values = "", "Normal", "None", "Add", "Subtract", "Stencil", "AddStencil", "TranslucentStencil", "Translucent", "Fuzzy", "OptFuzzy", "Soultrans", "Shaded", "AddShaded", "Shadow";
default = "";
}
}

group "Miscellaneous"
{
show_always = false;
type = int;
default = 0;

property floatbobphase = "Bobbing Phase";
property gravity
Expand Down
1 change: 1 addition & 0 deletions src/Utility/Property.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,6 +149,7 @@ string PropertyList::toString(bool condensed, int float_precision) const

if (property::valueType(prop.value) == property::ValueType::String)
{
val = strutil::escapedString(val);
val.insert(val.begin(), '\"');
val.push_back('\"');
}
Expand Down

0 comments on commit d532bce

Please sign in to comment.