@@ -3023,7 +3023,8 @@ static void php_imagechar(INTERNAL_FUNCTION_PARAMETERS, int mode)
30233023 zend_long X , Y , COL ;
30243024 zend_string * C ;
30253025 gdImagePtr im ;
3026- int ch = 0 , col , x , y , i , l = 0 ;
3026+ int ch = 0 , col , i , l = 0 ;
3027+ unsigned int x , y ;
30273028 unsigned char * str = NULL ;
30283029 zend_object * font_obj = NULL ;
30293030 zend_long font_int = 0 ;
@@ -3055,21 +3056,21 @@ static void php_imagechar(INTERNAL_FUNCTION_PARAMETERS, int mode)
30553056
30563057 switch (mode ) {
30573058 case 0 :
3058- gdImageChar (im , font , x , y , ch , col );
3059+ gdImageChar (im , font , ( int ) x , ( int ) y , ch , col );
30593060 break ;
30603061 case 1 :
30613062 php_gdimagecharup (im , font , x , y , ch , col );
30623063 break ;
30633064 case 2 :
30643065 for (i = 0 ; (i < l ); i ++ ) {
3065- gdImageChar (im , font , x , y , (int ) ((unsigned char ) str [i ]), col );
3066+ gdImageChar (im , font , ( int ) x , ( int ) y , (int ) ((unsigned char ) str [i ]), col );
30663067 x += font -> w ;
30673068 }
30683069 break ;
30693070 case 3 : {
30703071 for (i = 0 ; (i < l ); i ++ ) {
30713072 /* php_gdimagecharup(im, font, x, y, (int) str[i], col); */
3072- gdImageCharUp (im , font , x , y , (int ) str [i ], col );
3073+ gdImageCharUp (im , font , ( int ) x , ( int ) y , (int ) str [i ], col );
30733074 y -= font -> w ;
30743075 }
30753076 break ;
0 commit comments