Fix dhooks to call PushInt64 instead of PushArray(2).

This fixes issue #2574.
This commit is contained in:
David Anderson
2026-09-13 18:18:15 -07:00
parent 809392d1dc
commit 421c39bb6a
2 changed files with 5 additions and 5 deletions
+1 -1
View File
@@ -385,7 +385,7 @@ ReturnAction_t HandleDetour(HookType_t hookType, CHook* pDetour)
} else {
if (pWrapper->int64_address) {
std::int64_t addr = reinterpret_cast<std::int64_t>(thisAddr);
pWrapper->plugin_callback->PushArray(reinterpret_cast<cell_t*>(&addr), 2);
pWrapper->plugin_callback->PushInt64(addr);
} else {
pWrapper->plugin_callback->PushCell((cell_t)thisAddr);
}
+4 -4
View File
@@ -512,7 +512,7 @@ void *Callback(DHooksCallback *dg, void **argStack)
} else {
if (dg->int64_address) {
std::int64_t addr = reinterpret_cast<std::int64_t>(thisAddr);
dg->plugin_callback->PushArray(reinterpret_cast<cell_t*>(&addr), 2);
dg->plugin_callback->PushInt64(addr);
} else {
dg->plugin_callback->PushCell((cell_t)thisAddr);
}
@@ -710,7 +710,7 @@ float Callback_float(DHooksCallback *dg, void **argStack)
} else {
if (dg->int64_address) {
std::int64_t addr = reinterpret_cast<std::int64_t>(thisAddr);
dg->plugin_callback->PushArray(reinterpret_cast<cell_t*>(&addr), 2);
dg->plugin_callback->PushInt64(addr);
} else {
dg->plugin_callback->PushCell((cell_t)thisAddr);
}
@@ -881,7 +881,7 @@ SDKVector *Callback_vector(DHooksCallback *dg, void **argStack)
} else {
if (dg->int64_address) {
std::int64_t addr = reinterpret_cast<std::int64_t>(thisAddr);
dg->plugin_callback->PushArray(reinterpret_cast<cell_t*>(&addr), 2);
dg->plugin_callback->PushInt64(addr);
} else {
dg->plugin_callback->PushCell((cell_t)thisAddr);
}
@@ -1049,7 +1049,7 @@ string_t *Callback_stringt(DHooksCallback *dg, void **argStack)
} else {
if (dg->int64_address) {
std::int64_t addr = reinterpret_cast<std::int64_t>(thisAddr);
dg->plugin_callback->PushArray(reinterpret_cast<cell_t*>(&addr), 2);
dg->plugin_callback->PushInt64(addr);
} else {
dg->plugin_callback->PushCell((cell_t)thisAddr);
}