diff options
author | Haoyu Qiu <timothyqiu32@gmail.com> | 2021-06-16 16:32:03 +0800 |
---|---|---|
committer | Haoyu Qiu <timothyqiu32@gmail.com> | 2021-06-16 16:32:03 +0800 |
commit | 06c0a5f9f2167a82f7091d2febad10aec7214dc0 (patch) | |
tree | a6d1d8db94b11d882f04f3ae562fde209ceba5b4 /core | |
parent | d36b220531198b494fc309c015e04867926992fd (diff) |
Save binary ProjectSettings key length properly
Diffstat (limited to 'core')
-rw-r--r-- | core/config/project_settings.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp index 590c3ff50e..74ef05b797 100644 --- a/core/config/project_settings.cpp +++ b/core/config/project_settings.cpp @@ -711,8 +711,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<Str file->store_32(count + 1); //store how many properties are saved, add one for custom featuers, which must always go first String key = CoreStringNames::get_singleton()->_custom_features; - file->store_32(key.length()); - file->store_string(key); + file->store_pascal_string(key); int len; err = encode_variant(p_custom_features, nullptr, len, false); @@ -749,8 +748,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<Str value = get(key); } - file->store_32(key.length()); - file->store_string(key); + file->store_pascal_string(key); int len; err = encode_variant(value, nullptr, len, true); |