Skip to content

Commit

Permalink
Save binary ProjectSettings key length properly
Browse files Browse the repository at this point in the history
(cherry picked from commit 06c0a5f)
  • Loading branch information
timothyqiu authored and akien-mga committed Jun 17, 2021
1 parent f36a3c6 commit c1b2bd6
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions core/project_settings.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -690,8 +690,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, NULL, len, false);
Expand Down Expand Up @@ -728,8 +727,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<Str
else
value = get(key);

file->store_32(key.length());
file->store_string(key);
file->store_pascal_string(key);

int len;
err = encode_variant(value, NULL, len, true);
Expand Down

0 comments on commit c1b2bd6

Please sign in to comment.