|
@ -561,7 +561,7 @@ int ImDrawList::_CalcCircleAutoSegmentCount(float radius) const |
|
|
{ |
|
|
{ |
|
|
// Automatic segment count
|
|
|
// Automatic segment count
|
|
|
const int radius_idx = (int)(radius + 0.999999f); // ceil to never reduce accuracy
|
|
|
const int radius_idx = (int)(radius + 0.999999f); // ceil to never reduce accuracy
|
|
|
if (radius_idx < IM_ARRAYSIZE(_Data->CircleSegmentCounts)) |
|
|
if (radius_idx >= 0 && radius_idx < IM_ARRAYSIZE(_Data->CircleSegmentCounts)) |
|
|
return _Data->CircleSegmentCounts[radius_idx]; // Use cached value
|
|
|
return _Data->CircleSegmentCounts[radius_idx]; // Use cached value
|
|
|
else |
|
|
else |
|
|
return IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_CALC(radius, _Data->CircleSegmentMaxError); |
|
|
return IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_CALC(radius, _Data->CircleSegmentMaxError); |
|
|