Merge "Fix VkDeviceSize -> size_t warning in synchronization tests" into nyc-dev
diff --git a/modules/gles31/functional/es31fDrawBuffersIndexedTests.cpp b/modules/gles31/functional/es31fDrawBuffersIndexedTests.cpp
index 7c9ccda..a9948f3 100644
--- a/modules/gles31/functional/es31fDrawBuffersIndexedTests.cpp
+++ b/modules/gles31/functional/es31fDrawBuffersIndexedTests.cpp
@@ -1338,7 +1338,10 @@
 	if (isES32)
 		return glu::mapGLInternalFormat(de::getArrayElement(glFormats, rng.getUint32() % DE_LENGTH_OF_ARRAY(glFormats)));
 	else
-		return glu::mapGLInternalFormat(de::getArrayElement(glFormats, rng.getUint32() % (DE_LENGTH_OF_ARRAY(glFormats) - 6)));
+	{
+		DE_STATIC_ASSERT(DE_LENGTH_OF_ARRAY(glFormats) == 32);
+		return glu::mapGLInternalFormat(de::getArrayElement(glFormats, rng.getUint32() % (DE_LENGTH_OF_ARRAY(glFormats) - 5)));
+	}
 }
 
 void genRandomTest (de::Random& rng, BlendState& preCommon, BlendState& postCommon, vector<DrawBufferInfo>& drawBuffers, int maxDrawBufferCount, Context& context)