summaryrefslogtreecommitdiffstatshomepage
path: root/3rdparty/bgfx/src/shader_spirv.cpp
diff options
context:
space:
mode:
Diffstat (limited to '3rdparty/bgfx/src/shader_spirv.cpp')
-rw-r--r--3rdparty/bgfx/src/shader_spirv.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/3rdparty/bgfx/src/shader_spirv.cpp b/3rdparty/bgfx/src/shader_spirv.cpp
index a5809ae6c13..b859dbb5383 100644
--- a/3rdparty/bgfx/src/shader_spirv.cpp
+++ b/3rdparty/bgfx/src/shader_spirv.cpp
@@ -1,5 +1,5 @@
/*
- * Copyright 2011-2016 Branimir Karadzic. All rights reserved.
+ * Copyright 2011-2017 Branimir Karadzic. All rights reserved.
* License: https://github.com/bkaradzic/bgfx#license-bsd-2-clause
*/
@@ -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);