mirror of
https://github.com/WinampDesktop/winamp.git
synced 2025-04-29 15:35:42 -04: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:
|
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);
|
EnsureVertexBufferSpace(num_vertices);
|
||||||
|
|
||||||
const u32 first_color = rc.color_for_first_vertex;
|
const u32 first_color = rc.color_for_first_vertex;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user