@@ -2976,7 +2976,8 @@ static void php_imagechar(INTERNAL_FUNCTION_PARAMETERS, int mode)
29762976 zend_long X , Y , COL ;
29772977 zend_string * C ;
29782978 gdImagePtr im ;
2979- int ch = 0 , col , x , y , i ;
2979+ int ch = 0 , col , i , l = 0 ;
2980+ unsigned int x , y ;
29802981 size_t l = 0 ;
29812982 unsigned char * str = NULL ;
29822983 zend_object * font_obj = NULL ;
@@ -3009,21 +3010,21 @@ static void php_imagechar(INTERNAL_FUNCTION_PARAMETERS, int mode)
30093010
30103011 switch (mode ) {
30113012 case 0 :
3012- gdImageChar (im , font , x , y , ch , col );
3013+ gdImageChar (im , font , ( int ) x , ( int ) y , ch , col );
30133014 break ;
30143015 case 1 :
30153016 php_gdimagecharup (im , font , x , y , ch , col );
30163017 break ;
30173018 case 2 :
30183019 for (i = 0 ; (i < l ); i ++ ) {
3019- gdImageChar (im , font , x , y , (int ) ((unsigned char ) str [i ]), col );
3020+ gdImageChar (im , font , ( int ) x , ( int ) y , (int ) ((unsigned char ) str [i ]), col );
30203021 x += font -> w ;
30213022 }
30223023 break ;
30233024 case 3 : {
30243025 for (i = 0 ; (i < l ); i ++ ) {
30253026 /* php_gdimagecharup(im, font, x, y, (int) str[i], col); */
3026- gdImageCharUp (im , font , x , y , (int ) str [i ], col );
3027+ gdImageCharUp (im , font , ( int ) x , ( int ) y , (int ) str [i ], col );
30273028 y -= font -> w ;
30283029 }
30293030 break ;
0 commit comments