diff options
Diffstat (limited to '3rdparty/bgfx/src/shader_dxbc.cpp')
-rw-r--r-- | 3rdparty/bgfx/src/shader_dxbc.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/3rdparty/bgfx/src/shader_dxbc.cpp b/3rdparty/bgfx/src/shader_dxbc.cpp index 1cc948d316e..0ad82cc61a7 100644 --- a/3rdparty/bgfx/src/shader_dxbc.cpp +++ b/3rdparty/bgfx/src/shader_dxbc.cpp @@ -1000,7 +1000,7 @@ namespace bgfx break; } - for (uint32_t ii = 0; ii < _operand.numAddrModes; ++ii) + for (uint32_t ii = 0, num = bx::uint32_min(_operand.numAddrModes, BX_COUNTOF(_operand.addrMode) ); ii < num; ++ii) { switch (_operand.addrMode[ii]) { @@ -1526,7 +1526,7 @@ namespace bgfx ); } - for (uint32_t jj = first; jj < operand.numAddrModes; ++jj) + for (uint32_t jj = first, num = bx::uint32_min(operand.numAddrModes, BX_COUNTOF(operand.addrMode) ); jj < num; ++jj) { switch (operand.addrMode[jj]) { |