Fixed StoreToAddress always writing 32 bits and throwing an error.
This commit is contained in:
parent
5586f7c517
commit
74e546e145
@ -730,10 +730,13 @@ static cell_t StoreToAddress(IPluginContext *pContext, const cell_t *params)
|
||||
{
|
||||
case NumberType_Int8:
|
||||
*reinterpret_cast<uint8_t*>(addr) = data;
|
||||
break;
|
||||
case NumberType_Int16:
|
||||
*reinterpret_cast<uint16_t*>(addr) = data;
|
||||
break;
|
||||
case NumberType_Int32:
|
||||
*reinterpret_cast<uint32_t*>(addr) = data;
|
||||
break;
|
||||
default:
|
||||
pContext->ThrowNativeError("Invalid number types %d", size);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user