From c1b2bd6fb637f34c2c346ba1ecfc745da3a8fce7 Mon Sep 17 00:00:00 2001 From: Haoyu Qiu Date: Wed, 16 Jun 2021 16:32:03 +0800 Subject: [PATCH] Save binary ProjectSettings key length properly (cherry picked from commit 06c0a5f9f2167a82f7091d2febad10aec7214dc0) --- core/project_settings.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/core/project_settings.cpp b/core/project_settings.cpp index 46ab8f5f679..3efe25fc8b8 100644 --- a/core/project_settings.cpp +++ b/core/project_settings.cpp @@ -690,8 +690,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Mapstore_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, NULL, len, false); @@ -728,8 +727,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Mapstore_32(key.length()); - file->store_string(key); + file->store_pascal_string(key); int len; err = encode_variant(value, NULL, len, true);