mirror of
https://github.com/love2d/love.git
synced 2026-08-19 20:19:42 +02:00
avoid accessing array at index -1
This commit is contained in:
@@ -100,7 +100,7 @@ void Polyline::render(const Vector2 *coords, size_t count, size_t size_hint, flo
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Add the degenerate triangle strip.
|
// Add the degenerate triangle strip.
|
||||||
if (extra_vertices)
|
if (extra_vertices && vertex_count > 0)
|
||||||
{
|
{
|
||||||
vertices[vertex_count + 0] = vertices[vertex_count - 1];
|
vertices[vertex_count + 0] = vertices[vertex_count - 1];
|
||||||
vertices[vertex_count + 1] = vertices[overdraw_vertex_start];
|
vertices[vertex_count + 1] = vertices[overdraw_vertex_start];
|
||||||
|
|||||||
Reference in New Issue
Block a user