summaryrefslogtreecommitdiff
path: root/core/io/config_file.cpp
diff options
context:
space:
mode:
authorHaoyu Qiu <timothyqiu32@gmail.com>2021-08-28 13:00:10 +0800
committerHaoyu Qiu <timothyqiu32@gmail.com>2021-08-28 18:48:45 +0800
commit597d489a20d3755dae4b92ac7667e058d68b3d83 (patch)
treea1750157a062e7b166826280163d592c47480eff /core/io/config_file.cpp
parentdcf2d09231c03c444cf5374b4d250f327f1333e4 (diff)
Quote and escape ConfigFile keys when necessary
Diffstat (limited to 'core/io/config_file.cpp')
-rw-r--r--core/io/config_file.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/io/config_file.cpp b/core/io/config_file.cpp
index 55793aa5a4..49fa73dab2 100644
--- a/core/io/config_file.cpp
+++ b/core/io/config_file.cpp
@@ -188,7 +188,7 @@ Error ConfigFile::_internal_save(FileAccess *file) {
for (OrderedHashMap<String, Variant>::Element F = E.get().front(); F; F = F.next()) {
String vstr;
VariantWriter::write_to_string(F.get(), vstr);
- file->store_string(F.key() + "=" + vstr + "\n");
+ file->store_string(F.key().property_name_encode() + "=" + vstr + "\n");
}
}