mirror of
https://github.com/love2d/love.git
synced 2026-08-12 08:30:56 +02:00
Merge pull request #2097 from rfht/main
avoid segfault on OpenBSD by not 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.
|
||||
if (extra_vertices)
|
||||
if (extra_vertices && vertex_count > 0)
|
||||
{
|
||||
vertices[vertex_count + 0] = vertices[vertex_count - 1];
|
||||
vertices[vertex_count + 1] = vertices[overdraw_vertex_start];
|
||||
|
||||
Reference in New Issue
Block a user