Fix x86 sign-extension of high pointers
This commit is contained in:
committed by
Nicholas Hastings
parent
87a325f68e
commit
f5cea78b45
@@ -304,7 +304,7 @@ DataStatus EncodeValveParam(IPluginContext *pContext,
|
||||
if (pContext->LocalToPhysAddr(param, &sp_addr) != SP_ERROR_NONE) {
|
||||
return Data_Fail;
|
||||
}
|
||||
*reinterpret_cast<int64_t*>(sp_addr) = reinterpret_cast<intptr_t>(*(void**)buffer);
|
||||
*reinterpret_cast<int64_t*>(sp_addr) = reinterpret_cast<uintptr_t>(*(void**)buffer);
|
||||
|
||||
return Data_Okay;
|
||||
}
|
||||
@@ -635,7 +635,6 @@ DataStatus DecodeValveParam(IPluginContext *pContext,
|
||||
}
|
||||
void* addr = (void*)(*reinterpret_cast<int64_t*>(sp_addr));
|
||||
|
||||
|
||||
if (addr == nullptr && (data->decflags & VDECODE_FLAG_ALLOWNULL) == 0)
|
||||
{
|
||||
pContext->ThrowNativeError("NULL Address not allowed");
|
||||
|
||||
Reference in New Issue
Block a user