mirror of
https://github.com/alliedmodders/sourcemod.git
synced 2025-12-07 10:28:34 +00:00
Fix other cases where pointers were formatted with %x
This commit is contained in:
parent
82f7598130
commit
6abb1213ce
@ -129,7 +129,7 @@ void DebugReport::GenerateCodeError(IPluginContext *pContext, uint32_t code_addr
|
|||||||
{
|
{
|
||||||
g_Logger.LogError("[SM] Unable to call function \"%s\" due to above error(s).", name);
|
g_Logger.LogError("[SM] Unable to call function \"%s\" due to above error(s).", name);
|
||||||
} else {
|
} else {
|
||||||
g_Logger.LogError("[SM] Unable to call function (name unknown, address \"%x\").", code_addr);
|
g_Logger.LogError("[SM] Unable to call function (name unknown, address \"%p\").", code_addr);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -875,7 +875,7 @@ static cell_t LoadFromAddress(IPluginContext *pContext, const cell_t *params)
|
|||||||
}
|
}
|
||||||
else if (reinterpret_cast<uintptr_t>(addr) < VALID_MINIMUM_MEMORY_ADDRESS)
|
else if (reinterpret_cast<uintptr_t>(addr) < VALID_MINIMUM_MEMORY_ADDRESS)
|
||||||
{
|
{
|
||||||
return pContext->ThrowNativeError("Invalid address 0x%x is pointing to reserved memory.", addr);
|
return pContext->ThrowNativeError("Invalid address %p is pointing to reserved memory.", addr);
|
||||||
}
|
}
|
||||||
NumberType size = static_cast<NumberType>(params[2]);
|
NumberType size = static_cast<NumberType>(params[2]);
|
||||||
|
|
||||||
@ -907,7 +907,7 @@ static cell_t StoreToAddress(IPluginContext *pContext, const cell_t *params)
|
|||||||
}
|
}
|
||||||
else if (reinterpret_cast<uintptr_t>(addr) < VALID_MINIMUM_MEMORY_ADDRESS)
|
else if (reinterpret_cast<uintptr_t>(addr) < VALID_MINIMUM_MEMORY_ADDRESS)
|
||||||
{
|
{
|
||||||
return pContext->ThrowNativeError("Invalid address 0x%x is pointing to reserved memory.", addr);
|
return pContext->ThrowNativeError("Invalid address %p is pointing to reserved memory.", addr);
|
||||||
}
|
}
|
||||||
cell_t data = params[2];
|
cell_t data = params[2];
|
||||||
|
|
||||||
|
|||||||
@ -736,7 +736,7 @@ static cell_t LoadEntityFromHandleAddress(IPluginContext *pContext, const cell_t
|
|||||||
}
|
}
|
||||||
else if (reinterpret_cast<uintptr_t>(addr) < VALID_MINIMUM_MEMORY_ADDRESS)
|
else if (reinterpret_cast<uintptr_t>(addr) < VALID_MINIMUM_MEMORY_ADDRESS)
|
||||||
{
|
{
|
||||||
return pContext->ThrowNativeError("Invalid address 0x%x is pointing to reserved memory.", addr);
|
return pContext->ThrowNativeError("Invalid address %p is pointing to reserved memory.", addr);
|
||||||
}
|
}
|
||||||
|
|
||||||
CBaseHandle &hndl = *reinterpret_cast<CBaseHandle*>(addr);
|
CBaseHandle &hndl = *reinterpret_cast<CBaseHandle*>(addr);
|
||||||
|
|||||||
@ -406,7 +406,7 @@ static cell_t SDKCall(IPluginContext *pContext, const cell_t *params)
|
|||||||
else if (reinterpret_cast<uintptr_t>(thisptr) < VALID_MINIMUM_MEMORY_ADDRESS)
|
else if (reinterpret_cast<uintptr_t>(thisptr) < VALID_MINIMUM_MEMORY_ADDRESS)
|
||||||
{
|
{
|
||||||
vc->stk_put(ptr);
|
vc->stk_put(ptr);
|
||||||
return pContext->ThrowNativeError("Invalid ThisPtr address 0x%x is pointing to reserved memory.", thisptr);
|
return pContext->ThrowNativeError("Invalid ThisPtr address %p is pointing to reserved memory.", thisptr);
|
||||||
}
|
}
|
||||||
|
|
||||||
*(void **)ptr = thisptr;
|
*(void **)ptr = thisptr;
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user