Skip to content

Commit

Permalink
Fix case where GUObjectArray could fail to be found
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Aug 22, 2023
1 parent d00473f commit 94afda7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions shared/sdk/UObjectArray.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,10 @@ FUObjectArray* FUObjectArray::get() try {
// Now comes the real test, we need to check the entire size of the array and make sure that the pointers are valid
// Locate the distance between FUObjectItems
const auto potential_result = (FUObjectArray*)*displacement;
if (potential_result->get_object_count() <= 10) {
SPDLOG_INFO("Skipping potential GUObjectArray at 0x{:x} due to extremely small object count", *displacement);
return utility::ExhaustionResult::CONTINUE;
}
const auto first_item = potential_result->get_object(0);
bool distance_determined = false;

Expand Down

0 comments on commit 94afda7

Please sign in to comment.