Commit 312d26a4915bcf7ca1e428f7bdf7ed631574dc13

Werner Lemberg 2010-12-13T20:17:26

Fix parameter handling of `FT_Set_Renderer'. Reported by Kirill Tishin <siege@bk.ru>. * src/base/ftobjs.c (FT_Set_Renderer): Increment `parameters'.

diff --git a/ChangeLog b/ChangeLog
index 579ae62..0c9c1a5 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2010-12-13  Werner Lemberg  <wl@gnu.org>
+
+	Fix parameter handling of `FT_Set_Renderer'.
+	Reported by Kirill Tishin <siege@bk.ru>.
+
+	* src/base/ftobjs.c (FT_Set_Renderer): Increment `parameters'.
+
 2010-12-09  Werner Lemberg  <wl@gnu.org>
 
 	[cff] Allow `hlineto' and `vlineto' without arguments.
diff --git a/include/freetype/ftrender.h b/include/freetype/ftrender.h
index e06a814..dd0229b 100644
--- a/include/freetype/ftrender.h
+++ b/include/freetype/ftrender.h
@@ -212,6 +212,14 @@ FT_BEGIN_HEADER
   /*                                                                       */
   /*    This doesn't change the current renderer for other formats.        */
   /*                                                                       */
+  /*    Currently, only the B/W renderer, if compiled with                 */
+  /*    FT_RASTER_OPTION_ANTI_ALIASING (providing a 5-levels               */
+  /*    anti-aliasing mode; this option must be set directly in            */
+  /*    `ftraster.c' and is undefined by default) accepts a single tag     */
+  /*    `pal5' to set its gray palette as a character string with          */
+  /*    5~elements.  Consequently, the third and fourth argument are zero  */
+  /*    normally.                                                          */
+  /*                                                                       */
   FT_EXPORT( FT_Error )
   FT_Set_Renderer( FT_Library     library,
                    FT_Renderer    renderer,
diff --git a/src/base/ftobjs.c b/src/base/ftobjs.c
index cb44b8c..6b01f43 100644
--- a/src/base/ftobjs.c
+++ b/src/base/ftobjs.c
@@ -3887,6 +3887,7 @@
         error = set_mode( renderer, parameters->tag, parameters->data );
         if ( error )
           break;
+        parameters++;
       }
     }