diff options
author | RĂ©mi Verschelde <rverschelde@gmail.com> | 2019-04-16 10:33:34 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-16 10:33:34 +0200 |
commit | 4f81945fedd26d6dcf34536963318f6b412b762e (patch) | |
tree | f5d45a6509f204b4fab7addd1d7a0daf0f373a2e /core/project_settings.cpp | |
parent | 642076888716f6e15b77925ff2f764351fe381d9 (diff) | |
parent | 1f54b11da6a0f3e7913557d91048e7fac8377fa9 (diff) |
Merge pull request #28052 from muiroc/settings_decodes_objects
Enable object decoding when serializing binary project settings
Diffstat (limited to 'core/project_settings.cpp')
-rw-r--r-- | core/project_settings.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/core/project_settings.cpp b/core/project_settings.cpp index 5752cdca2b..c86d1567dd 100644 --- a/core/project_settings.cpp +++ b/core/project_settings.cpp @@ -501,7 +501,7 @@ Error ProjectSettings::_load_settings_binary(const String p_path) { d.resize(vlen); f->get_buffer(d.ptrw(), vlen); Variant value; - err = decode_variant(value, d.ptr(), d.size(), NULL, false); + err = decode_variant(value, d.ptr(), d.size(), NULL, true); ERR_EXPLAIN("Error decoding property: " + key); ERR_CONTINUE(err != OK); set(key, value); @@ -694,7 +694,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<Str file->store_string(key); int len; - err = encode_variant(value, NULL, len, false); + err = encode_variant(value, NULL, len, true); if (err != OK) memdelete(file); ERR_FAIL_COND_V(err != OK, ERR_INVALID_DATA); @@ -702,7 +702,7 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const Map<Str Vector<uint8_t> buff; buff.resize(len); - err = encode_variant(value, buff.ptrw(), len, false); + err = encode_variant(value, buff.ptrw(), len, true); if (err != OK) memdelete(file); ERR_FAIL_COND_V(err != OK, ERR_INVALID_DATA); |