diff --git a/shared/sdk/FName.cpp b/shared/sdk/FName.cpp index ab6d7e4a..475184ba 100644 --- a/shared/sdk/FName.cpp +++ b/shared/sdk/FName.cpp @@ -458,8 +458,7 @@ std::wstring FName::to_string() const { fn(this, &buffer); if (buffer.data != nullptr) { - std::wstring result = buffer.data; - return result; + return buffer.data; } return std::wstring{}; diff --git a/shared/sdk/TArray.hpp b/shared/sdk/TArray.hpp index c5b63b92..288703b8 100644 --- a/shared/sdk/TArray.hpp +++ b/shared/sdk/TArray.hpp @@ -17,6 +17,8 @@ struct TArray { return; } + // TODO: call destructors? + if (auto m = FMalloc::get(); m != nullptr) { m->free(data); } diff --git a/shared/sdk/UClass.cpp b/shared/sdk/UClass.cpp index 4d0ea46f..53d654dc 100644 --- a/shared/sdk/UClass.cpp +++ b/shared/sdk/UClass.cpp @@ -99,6 +99,7 @@ void UStruct::resolve_field_offsets(uint32_t child_search_start) { if (class_offset) { FField::s_class_offset = *class_offset - (uintptr_t)potential_field; + FFieldClass::s_name_offset = UObjectBase::s_fname_offset; found_ufield_class_offset = true; SPDLOG_INFO("[UStruct] Found FField/UField Class at offset 0x{:X}", FField::s_class_offset); } @@ -110,6 +111,7 @@ void UStruct::resolve_field_offsets(uint32_t child_search_start) { if (class_offset) { FField::s_class_offset = *class_offset - (uintptr_t)potential_field; + FFieldClass::s_name_offset = UObjectBase::s_fname_offset; found_ufield_class_offset = true; SPDLOG_INFO("[UStruct] Found FField/UField Class at offset 0x{:X}", FField::s_class_offset); }