This commit is contained in:
Branimir Karadžić
2016-11-12 21:44:33 -08:00
parent b0f9dcbed8
commit ff669aceab
2 changed files with 6 additions and 2 deletions

View File

@@ -990,7 +990,11 @@ namespace bgfx
break;
default:
for (;size/4 != _instruction.length && _err->isOk(); ++currOp)
for (
; size/4 != _instruction.length
&& _err->isOk()
&& currOp < BX_COUNTOF(_instruction.operand)
; ++currOp)
{
_instruction.operand[currOp].type = info.operands[currOp];
size += read(_reader, _instruction.operand[currOp], _err);

View File

@@ -601,7 +601,7 @@ namespace bgfx
bool hasType;
bool hasResult;
SpvOperand operand[8];
SpvOperand operand[10];
};
int32_t read(bx::ReaderI* _reader, SpvInstruction& _instruction, bx::Error* _err);