mirror of
https://github.com/stenzek/duckstation.git
synced 2025-06-10 05:17:19 +00:00
GPU/HW: Fix possible crash when drawing polylines
This commit is contained in:
parent
4655aa02f8
commit
aaf9dcaf02
@ -359,7 +359,8 @@ void GPU_HW::LoadVertices()
|
||||
|
||||
case Primitive::Line:
|
||||
{
|
||||
const u32 num_vertices = rc.polyline ? GetPolyLineVertexCount() : 2;
|
||||
// Multiply by two because we don't use line strips.
|
||||
const u32 num_vertices = rc.polyline ? (GetPolyLineVertexCount() * 2u) : 2u;
|
||||
EnsureVertexBufferSpace(num_vertices);
|
||||
|
||||
const u32 first_color = rc.color_for_first_vertex;
|
||||
|
Loading…
x
Reference in New Issue
Block a user