diff --git a/src/gx/d3d/CGxDeviceD3d.cpp b/src/gx/d3d/CGxDeviceD3d.cpp index 3b9c958..5d4a808 100644 --- a/src/gx/d3d/CGxDeviceD3d.cpp +++ b/src/gx/d3d/CGxDeviceD3d.cpp @@ -398,7 +398,7 @@ void CGxDeviceD3d::BufData(CGxBuf* buf, void* data, size_t size, uintptr_t offse CGxDevice::BufData(buf, data, size, offset); auto bufData = this->IBufLock(buf); - memcpy(reinterpret_cast(uintptr_t(bufData) + offset)), data, size); + memcpy(&bufData[offset], data, size); this->IBufUnlock(buf); } diff --git a/src/gx/gll/CGxDeviceGLL.cpp b/src/gx/gll/CGxDeviceGLL.cpp index d158eb8..f82890d 100644 --- a/src/gx/gll/CGxDeviceGLL.cpp +++ b/src/gx/gll/CGxDeviceGLL.cpp @@ -121,7 +121,7 @@ void CGxDeviceGLL::BufData(CGxBuf* buf, void* data, size_t size, uintptr_t offse CGxDevice::BufData(buf, data, size, offset); auto bufData = this->IBufLock(buf); - memcpy(reinterpret_cast(uintptr_t(bufData) + offset), data, size); + memcpy(&bufData[offset], data, size); this->IBufUnlock(buf); }