From fd2b1e523c33e48b6204133f9658f40ad0152875 Mon Sep 17 00:00:00 2001 From: Magnus Norddahl Date: Sun, 17 Sep 2023 00:08:51 +0200 Subject: [PATCH] Fix crash bug where an index buffer was bound as a vertex buffer --- src/common/rendering/hwrenderer/hw_draw2d.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/common/rendering/hwrenderer/hw_draw2d.cpp b/src/common/rendering/hwrenderer/hw_draw2d.cpp index 6300d6d025..4f556e77dc 100644 --- a/src/common/rendering/hwrenderer/hw_draw2d.cpp +++ b/src/common/rendering/hwrenderer/hw_draw2d.cpp @@ -213,7 +213,7 @@ void Draw2D(F2DDrawer* drawer, FRenderState& state, int x, int y, int width, int state.SetIndexBuffer(buffers.GetBufferObjects().second); state.DrawIndexed(DT_Triangles, 0, cmd.shape2DIndexCount); state.SetVertexBuffer(vb.GetBufferObjects().first); - state.SetVertexBuffer(vb.GetBufferObjects().second); + state.SetIndexBuffer(vb.GetBufferObjects().second); if (cmd.shape2DCommandCounter == cmd.shape2DBufInfo->lastCommand) { cmd.shape2DBufInfo->lastCommand = -1;