Skip to content

Commit

Permalink
SDK: Minor fixes to improper reference scanning
Browse files Browse the repository at this point in the history
  • Loading branch information
praydog committed Oct 12, 2023
1 parent 039a438 commit b95c99a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion shared/sdk/CVar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -587,7 +587,7 @@ std::optional<uintptr_t> vr::get_slate_draw_to_vr_render_target_usage_location()

for (auto ref = utility::scan_displacement_reference(module, cvar_addr);
ref;
ref = utility::scan_displacement_reference(*ref + 1, (module_end - (*ref + 1)), cvar_addr))
ref = utility::scan_displacement_reference(*ref + 4, (module_end - (*ref + 4)), cvar_addr))
{
SPDLOG_INFO("Checking if Slate.DrawToVRRenderTarget is used at {:x}", *ref);

Expand Down
2 changes: 1 addition & 1 deletion shared/sdk/UEngine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ std::optional<uintptr_t> UEngine::get_emulatestereo_string_ref_address() {
for (auto str = utility::scan_string(mod, L"emulatestereo"); str; str = utility::scan_string(*str + 1, (end - (*str + 1)) - 0x1000, L"emulatestereo")) {
SPDLOG_INFO("On string at {:x}", (uintptr_t)*str);

for (auto ref = utility::scan_displacement_reference(mod, *str); ref; ref = utility::scan_displacement_reference(*ref + 1, (end - (*ref + 1)) - 0x1000, *str)) {
for (auto ref = utility::scan_displacement_reference(mod, *str); ref; ref = utility::scan_displacement_reference(*ref + 4, (end - (*ref + 4)) - 0x1000, *str)) {
SPDLOG_INFO("On reference at {:x}", (uintptr_t)*ref);

// InitializeHMDDevice has always been guaranteed to be a virtual function
Expand Down

0 comments on commit b95c99a

Please sign in to comment.