diff options
author | nikitalita <69168929+nikitalita@users.noreply.github.com> | 2021-07-29 18:17:49 -0700 |
---|---|---|
committer | nikitalita <69168929+nikitalita@users.noreply.github.com> | 2021-07-29 18:17:49 -0700 |
commit | 160601cc78d14d500095a5127d49c335b249141a (patch) | |
tree | 1eaf2f8af3e35a02a72d4d7e26a04a88d3734035 /core | |
parent | 44012fa61db860e66182fd8ea0b7a11de9cd75a9 (diff) |
Fix binary resource loading and saving
Diffstat (limited to 'core')
-rw-r--r-- | core/io/resource_format_binary.cpp | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/io/resource_format_binary.cpp b/core/io/resource_format_binary.cpp index a3ebc32cc5..144db697fb 100644 --- a/core/io/resource_format_binary.cpp +++ b/core/io/resource_format_binary.cpp @@ -906,7 +906,7 @@ void ResourceLoaderBinary::open(FileAccess *p_f, bool p_no_resources, bool p_kee uid = ResourceUID::INVALID_ID; } - for (int i = 0; i < 5; i++) { + for (int i = 0; i < 11; i++) { f->get_32(); //skip a few reserved fields } @@ -1209,8 +1209,8 @@ Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, cons fw->store_32(flags); fw->store_64(uid_data); - for (int i = 0; i < 5; i++) { - f->store_32(0); // reserved + for (int i = 0; i < 11; i++) { + fw->store_32(0); // reserved f->get_32(); } @@ -1264,7 +1264,7 @@ Error ResourceFormatLoaderBinary::rename_dependencies(const String &p_path, cons if (using_uids) { ResourceUID::ID uid = ResourceSaver::get_resource_id_for_path(full_path); - f->store_64(uid); + fw->store_64(uid); } } @@ -1902,7 +1902,7 @@ Error ResourceFormatSaverBinaryInstance::save(const String &p_path, const RES &p f->store_32(FORMAT_FLAG_NAMED_SCENE_IDS | FORMAT_FLAG_UIDS); ResourceUID::ID uid = ResourceSaver::get_resource_id_for_path(p_path, true); f->store_64(uid); - for (int i = 0; i < 5; i++) { + for (int i = 0; i < 11; i++) { f->store_32(0); // reserved } |