From 19ff3b31d87a4958728880fc963866b0ac582457 Mon Sep 17 00:00:00 2001 From: Mikko Mononen Date: Fri, 29 May 2026 16:08:49 +0300 Subject: [PATCH] DrawList: Fixed vertex count calculation in_AddRectTinyRounding() --- imgui_draw.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/imgui_draw.cpp b/imgui_draw.cpp index 877d5ac62..3946c0950 100644 --- a/imgui_draw.cpp +++ b/imgui_draw.cpp @@ -2376,7 +2376,7 @@ void ImDrawList::_AddRectTinyRounding(const ImVec2& p_min, const ImVec2& p_max, const int arc_step = ImClamp(IM_DRAWLIST_ARCFAST_SAMPLE_MAX / this->_CalcCircleAutoSegmentCount(rounding), 1, IM_DRAWLIST_ARCFAST_TABLE_SIZE / 4); const int arc_point_count = (IM_DRAWLIST_ARCFAST_TABLE_SIZE / 4) / arc_step + 1; - int vtx_count = (4 + arc_point_count) * 3 + 3; + int vtx_count = (2 + arc_point_count) * 4 + 3; int idx_count = (4 + arc_point_count - 1) * 4 * 3; PrimReserve(idx_count, vtx_count);