@@ -2763,7 +2763,8 @@ static void php_imagechar(INTERNAL_FUNCTION_PARAMETERS, int mode)
27632763 char * C ;
27642764 size_t C_len ;
27652765 gdImagePtr im ;
2766- int ch = 0 , col , x , y , i , l = 0 ;
2766+ int ch = 0 , col , i , l = 0 ;
2767+ unsigned int x , y ;
27672768 unsigned char * str = NULL ;
27682769 zend_object * font_obj = NULL ;
27692770 zend_long font_int = 0 ;
@@ -2795,21 +2796,21 @@ static void php_imagechar(INTERNAL_FUNCTION_PARAMETERS, int mode)
27952796
27962797 switch (mode ) {
27972798 case 0 :
2798- gdImageChar (im , font , x , y , ch , col );
2799+ gdImageChar (im , font , ( int ) x , ( int ) y , ch , col );
27992800 break ;
28002801 case 1 :
28012802 php_gdimagecharup (im , font , x , y , ch , col );
28022803 break ;
28032804 case 2 :
28042805 for (i = 0 ; (i < l ); i ++ ) {
2805- gdImageChar (im , font , x , y , (int ) ((unsigned char ) str [i ]), col );
2806+ gdImageChar (im , font , ( int ) x , ( int ) y , (int ) ((unsigned char ) str [i ]), col );
28062807 x += font -> w ;
28072808 }
28082809 break ;
28092810 case 3 : {
28102811 for (i = 0 ; (i < l ); i ++ ) {
28112812 /* php_gdimagecharup(im, font, x, y, (int) str[i], col); */
2812- gdImageCharUp (im , font , x , y , (int ) str [i ], col );
2813+ gdImageCharUp (im , font , ( int ) x , ( int ) y , (int ) str [i ], col );
28132814 y -= font -> w ;
28142815 }
28152816 break ;
0 commit comments