Skip to content

Commit

Permalink
Just a minor fix to avoid crash
Browse files Browse the repository at this point in the history
  • Loading branch information
Qining authored and AWoloszyn committed Jul 27, 2017
1 parent 7a13c8d commit 27f87c9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gapis/api/vulkan/draw_call_mesh.go
Original file line number Diff line number Diff line change
Expand Up @@ -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")
Expand Down

0 comments on commit 27f87c9

Please sign in to comment.