Skip to content

Commit

Permalink
also check weak object index upper bound
Browse files Browse the repository at this point in the history
  • Loading branch information
apple1417 committed Dec 15, 2023
1 parent fe2f737 commit 38529ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/unrealsdk/unreal/wrappers/gobjects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ UObject* GObjects::get_weak_object(const FWeakObjectPtr* ptr) const {
if (ptr->object_serial_number == 0) {
return nullptr;
}
if (ptr->object_index < 0) {
if (0 > ptr->object_index || ptr->object_index >= this->internal->ObjObjects.Count) {
return nullptr;
}

Expand Down

0 comments on commit 38529ae

Please sign in to comment.