From 27f87c9e8b1e3bdc24d5a144956f41190da87561 Mon Sep 17 00:00:00 2001 From: Qining Lu Date: Thu, 27 Jul 2017 15:09:23 -0400 Subject: [PATCH] Just a minor fix to avoid crash --- gapis/api/vulkan/draw_call_mesh.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gapis/api/vulkan/draw_call_mesh.go b/gapis/api/vulkan/draw_call_mesh.go index 48fa9c76fc..92f8a168a8 100644 --- a/gapis/api/vulkan/draw_call_mesh.go +++ b/gapis/api/vulkan/draw_call_mesh.go @@ -293,7 +293,7 @@ func getVerticesData(ctx context.Context, s *api.State, thread uint64, fullSize := uint64(vertexCount-1)*stride + perVertexSize offset := uint64(attribute.Offset) + (uint64(firstVertex) * stride) - if offset > vertexSlice.count || offset+fullSize > vertexSlice.count { + if offset >= vertexSlice.count || offset+fullSize > vertexSlice.count { // We do not actually have a big enough buffer for this. Return // our zero-initialized buffer. return out, fmt.Errorf("Vertex data is out of range")