Fix other cases where pointers were formatted with %x

This commit is contained in:
Nicholas Hastings 2025-03-31 16:28:08 -04:00
parent 82f7598130
commit 6abb1213ce
4 changed files with 5 additions and 5 deletions

View File

@ -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);
} 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);
}
}

View File

@ -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)
{
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]);
@ -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)
{
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];

View File

@ -736,7 +736,7 @@ static cell_t LoadEntityFromHandleAddress(IPluginContext *pContext, const cell_t
}
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);

View File

@ -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)
{
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;