mirror of
https://github.com/doitsujin/dxvk.git
synced 2025-02-22 07:54:15 +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:
parent
a427d22cde
commit
2ed1778df9
@ -1130,7 +1130,7 @@ namespace dxvk {
|
|||||||
if (likely(pBuffer != nullptr))
|
if (likely(pBuffer != nullptr))
|
||||||
bufferSize = static_cast<D3D11Buffer*>(pBuffer)->Desc()->ByteWidth;
|
bufferSize = static_cast<D3D11Buffer*>(pBuffer)->Desc()->ByteWidth;
|
||||||
|
|
||||||
return bufferSize >= Offset + Size;
|
return uint64_t(bufferSize) >= uint64_t(Offset) + uint64_t(Size);
|
||||||
}
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user