A better fix for Savannah bug #32671. * src/smooth/ftgrays.c (gray_render_conic): Clean up code and replace WHILE loop with a more natural DO-WHILE construct.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
diff --git a/ChangeLog b/ChangeLog
index 50adafa..068da8f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2011-03-17 Alexei Podtelezhnikov <apodtele@gmail.com>
+
+ A better fix for Savannah bug #32671.
+
+ * src/smooth/ftgrays.c (gray_render_conic): Clean up code and
+ replace WHILE loop with a more natural DO-WHILE construct.
+
2011-03-16 Werner Lemberg <wl@gnu.org>.
* src/base/ftstroke.c (FT_StrokerRec): Remove unused `valid' field.
diff --git a/src/smooth/ftgrays.c b/src/smooth/ftgrays.c
index 648c75e..40de269 100644
--- a/src/smooth/ftgrays.c
+++ b/src/smooth/ftgrays.c
@@ -4,7 +4,7 @@
/* */
/* A new `perfect' anti-aliasing renderer (body). */
/* */
-/* Copyright 2000-2001, 2002, 2003, 2005, 2006, 2007, 2008, 2009, 2010 by */
+/* Copyright 2000-2003, 2005-2011 by */
/* David Turner, Robert Wilhelm, and Werner Lemberg. */
/* */
/* This file is part of the FreeType project, and may only be used, */
@@ -890,12 +890,6 @@ typedef ptrdiff_t FT_PtrDist;
if ( dx < dy )
dx = dy;
- if ( dx <= ONE_PIXEL / 4 )
- {
- gray_render_line( RAS_VAR_ arc[0].x, arc[0].y );
- return;
- }
-
level = 0;
while ( dx > ONE_PIXEL / 6 )
{
@@ -907,7 +901,7 @@ typedef ptrdiff_t FT_PtrDist;
levels[0] = level;
top = 0;
- while ( top >= 0 )
+ do
{
level = levels[top];
if ( level > 1 )
@@ -940,9 +934,8 @@ typedef ptrdiff_t FT_PtrDist;
gray_render_line( RAS_VAR_ arc[0].x, arc[0].y );
top--;
arc -= 2;
- }
- return;
+ } while ( top >= 0 );
}