cvs: php4 /ext/gd gd.c

From: Date: Fri, 16 Nov 2001 11:59:04 +0000
Subject: cvs: php4 /ext/gd gd.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-8223@lists.php.net to get a copy of this message
rasmus Fri Nov 16 06:59:04 2001 EDT Modified files: /php4/ext/gd gd.c Log: Use the macro here and add an E_NOTICE Index: php4/ext/gd/gd.c diff -u php4/ext/gd/gd.c:1.170 php4/ext/gd/gd.c:1.171 --- php4/ext/gd/gd.c:1.170 Tue Nov 13 08:53:11 2001 +++ php4/ext/gd/gd.c Fri Nov 16 06:59:04 2001 @@ -18,7 +18,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: gd.c,v 1.170 2001/11/13 13:53:11 rasmus Exp $ */ +/* $Id: gd.c,v 1.171 2001/11/16 11:59:04 rasmus Exp $ */ /* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center, Cold Spring Harbor Labs. */ @@ -1592,8 +1592,9 @@ #if HAVE_LIBGD20 if(gdImageTrueColor(im)) { if (im->tpixels && gdImageBoundsSafe(im, Z_LVAL_PP(x), Z_LVAL_PP(y))) { - RETURN_LONG(im->tpixels[Z_LVAL_PP(x)][Z_LVAL_PP(y)]); + RETURN_LONG(gdImageTrueColorPixel(im, Z_LVAL_PP(x), Z_LVAL_PP(y))); } else { + php_error(E_NOTICE, "%ld,%ld is out of bounds",Z_LVAL_PP(x), Z_LVAL_PP(y)); RETURN_FALSE; } } else { @@ -1605,6 +1606,7 @@ RETURN_LONG(im->pixels[Z_LVAL_PP(x)][Z_LVAL_PP(y)]); #endif } else { + php_error(E_NOTICE, "%ld,%ld is out of bounds",Z_LVAL_PP(x), Z_LVAL_PP(y)); RETURN_FALSE; } #if HAVE_LIBGD20

« previous php.cvs (#8223) next »