1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2025-02-20 19:54:19 +01:00

[d3d11] Handle potential integer overflow when validating draw offsets

Apparently some games use -1 as an argument offset, which is nonsensical
and leads to issues.
This commit is contained in:
Philip Rebohle 2023-11-02 17:49:38 +01:00
parent a427d22cde
commit 2ed1778df9

View File

@ -1130,7 +1130,7 @@ namespace dxvk {
if (likely(pBuffer != nullptr))
bufferSize = static_cast<D3D11Buffer*>(pBuffer)->Desc()->ByteWidth;
return bufferSize >= Offset + Size;
return uint64_t(bufferSize) >= uint64_t(Offset) + uint64_t(Size);
}
private: