diff --git a/lib/GfxRenderer/GfxRenderer.cpp b/lib/GfxRenderer/GfxRenderer.cpp index 1053146a..8d34423f 100644 --- a/lib/GfxRenderer/GfxRenderer.cpp +++ b/lib/GfxRenderer/GfxRenderer.cpp @@ -998,7 +998,9 @@ void GfxRenderer::drawArc(const int maxRadius, const int cx, const int cy, const while (xOuter > 0 && (xOuter * xOuter + dy * dy) > outerRadiusSq) { --xOuter; } - while (xInner > 0 && (xInner * xInner + dy * dy) > innerRadiusSq) { + // Keep the smallest x that still lies outside/at the inner radius, + // i.e. (x^2 + y^2) >= innerRadiusSq. + while (xInner > 0 && ((xInner - 1) * (xInner - 1) + dy * dy) >= innerRadiusSq) { --xInner; }