Browse Source

Bugfix: Fixed a memory corruption caused by the recent RTTI refactor

BearishSun 6 năm trước cách đây
mục cha
commit
00988118ec

+ 2 - 2
Source/EditorCore/Private/RTTI/BsProjectLibraryEntriesRTTI.h

@@ -58,7 +58,7 @@ namespace bs
 		static uint32_t toMemory(const ProjectLibrary::FileEntry& data, Bitstream& stream, const RTTIFieldInfo& fieldInfo, bool compress)
 		{ 
 			return rtti_write_with_size_header(stream, [&data, &stream]()
-				{
+			{
 				uint32_t size = 0;
 
 				// For compatibility, encoding the name as a wide string
@@ -139,7 +139,7 @@ namespace bs
 					if(child->type == ProjectLibrary::LibraryEntryType::File)
 					{
 						auto* childResEntry = static_cast<ProjectLibrary::FileEntry*>(child.get());
-						size = rtti_write(*childResEntry, stream);
+						size += rtti_write(*childResEntry, stream);
 					}
 					else if(child->type == ProjectLibrary::LibraryEntryType::Directory)
 					{

+ 1 - 1
Source/bsf

@@ -1 +1 @@
-Subproject commit d53d7531dc3f7c58abc114b3ef4e32e1cc305200
+Subproject commit b14e80e0ed43511d182be73b5e606fafca496251