diff options
author | Philip Rebohle <philip.rebohle@tu-dortmund.de> | 2023-11-02 19:49:38 +0300 |
---|---|---|
committer | Philip Rebohle <philip.rebohle@tu-dortmund.de> | 2023-11-02 19:49:38 +0300 |
commit | 2ed1778df9ea5d81fff22f76f125b08995454847 (patch) | |
tree | d5c2ed97ec2fd625edfc65efaba2ce4147b394fc | |
parent | a427d22cdee4a5166e000b0a1f540c52b42afa13 (diff) |
[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.
-rw-r--r-- | src/d3d11/d3d11_context.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/d3d11/d3d11_context.h b/src/d3d11/d3d11_context.h index 618c07d6..7383507f 100644 --- a/src/d3d11/d3d11_context.h +++ b/src/d3d11/d3d11_context.h @@ -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: |