We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4652d66 commit 0932ba6Copy full SHA for 0932ba6
1 file changed
Src/BinaryReader.h
@@ -45,11 +45,7 @@ namespace DirectX
45
{
46
static_assert(std::is_standard_layout<T>::value, "Can only read plain-old-data types");
47
48
- uint64_t byteCount = uint64_t(sizeof(T)) * uint64_t(elementCount);
49
- if (byteCount > UINT32_MAX)
50
- throw std::overflow_error("ReadArray");
51
-
52
- uint8_t const* newPos = mPos + static_cast<size_t>(byteCount);
+ uint8_t const* newPos = mPos + sizeof(T) * elementCount;
53
54
if (newPos < mPos)
55
throw std::overflow_error("ReadArray");
0 commit comments