Skip to content

Imgui Crash #5293

@FF69B3

Description

@FF69B3

int ImDrawList::_CalcCircleAutoSegmentCount(float radius) const
{
// Automatic segment count
const int radius_idx = (int)(radius + 0.999999f); // ceil to never reduce accuracy

if (radius_idx < IM_ARRAYSIZE(_Data->CircleSegmentCounts))
return _Data->CircleSegmentCounts[radius_idx]; // Crash Here
else
return IM_DRAWLIST_CIRCLE_AUTO_SEGMENT_CALC(radius, _Data->CircleSegmentMaxError);
}

I Use Inject ImguiDx11 Dll , When I draw the rect, and I use rounding, crash in some cases, and when I debug the code, it crashes here. return _Data->CircleSegmentCounts[radius_idx];

I don't know why。

return radius * 2;

I use like this, no crash

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions