mirror of
https://github.com/ocornut/imgui.git
synced 2025-04-07 22:43:09 +00:00
ImDrawList: fix divide by zero (for which result was unused but triggering on some archs/setup) added by f144c67676
(#3738)
This commit is contained in:
parent
b898281e3c
commit
03038df1cc
1 changed files with 1 additions and 1 deletions
|
@ -384,7 +384,7 @@ void ImDrawListSharedData::SetCircleSegmentMaxError(float max_error)
|
|||
for (int i = 0; i < IM_ARRAYSIZE(CircleSegmentCounts); i++)
|
||||
{
|
||||
const float radius = (float)i;
|
||||
const int segment_count = IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_CALC(radius, CircleSegmentMaxError);
|
||||
const int segment_count = (i > 0) ? IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_CALC(radius, CircleSegmentMaxError) : 0;
|
||||
CircleSegmentCounts[i] = (ImU8)ImMin(segment_count, 255);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue