Date: 07/30/98
- Next message: Rasmus Lerdorf: "Re: [PHP-DEV] Bug #597: imagettfbbox dumps core"
- Previous message: Bug Database: "[PHP-DEV] Bug #597 Updated: imagettfbbox dumps core"
- Next in thread: steffann: "[PHP-DEV] CVS update: php3/functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thursday July 30, 1998 @ 8:01
Author: rasmus
Update of /repository/php3/functions
In directory asf:/tmp/cvs-serv8531/functions
Modified Files:
gd.c
Log Message:
Fix to bugs 559 and 597 by John Ellson
Index: php3/functions/gd.c
diff -c php3/functions/gd.c:1.87 php3/functions/gd.c:1.88
*** php3/functions/gd.c:1.87 Mon Jul 27 18:07:08 1998
--- php3/functions/gd.c Thu Jul 30 08:01:00 1998
***************
*** 29,35 ****
+----------------------------------------------------------------------+
*/
! /* $Id: gd.c,v 1.87 1998/07/27 22:07:08 shane Exp $ */
/* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
--- 29,35 ----
+----------------------------------------------------------------------+
*/
! /* $Id: gd.c,v 1.88 1998/07/30 12:01:00 rasmus Exp $ */
/* gd 1.2 is copyright 1994, 1995, Quest Protein Database Center,
Cold Spring Harbor Labs. */
***************
*** 1539,1546 ****
convert_to_string(FONTNAME);
convert_to_string(C);
if (mode == TTFTEXT_BBOX) {
! IM->type = IS_LONG;
! IM->value.lval = -1;
col = x = y = -1;
} else {
convert_to_long(X);
--- 1539,1545 ----
convert_to_string(FONTNAME);
convert_to_string(C);
if (mode == TTFTEXT_BBOX) {
! im = NULL;
col = x = y = -1;
} else {
convert_to_long(X);
***************
*** 1550,1555 ****
--- 1549,1559 ----
col = COL->value.lval;
y = Y->value.lval;
x = X->value.lval;
+ im = php3_list_find(IM->value.lval, &ind_type);
+ if (!im || ind_type != GD_GLOBAL(le_gd)) {
+ php3_error(E_WARNING, "Unable to find image pointer");
+ RETURN_FALSE;
+ }
}
ptsize = PTSIZE->value.dval;
***************
*** 1558,1573 ****
string = (unsigned char *) C->value.str.val;
l = strlen(string);
fontname = (unsigned char *) FONTNAME->value.str.val;
-
- if (mode == TTFTEXT_BBOX) {
- im = NULL;
- } else {
- im = php3_list_find(IM->value.lval, &ind_type);
- if (!im || ind_type != GD_GLOBAL(le_gd)) {
- php3_error(E_WARNING, "Unable to find image pointer");
- RETURN_FALSE;
- }
- }
error = gdttf(im, brect, col, fontname, ptsize, angle, x, y, string);
--- 1562,1567 ----
- Next message: Rasmus Lerdorf: "Re: [PHP-DEV] Bug #597: imagettfbbox dumps core"
- Previous message: Bug Database: "[PHP-DEV] Bug #597 Updated: imagettfbbox dumps core"
- Next in thread: steffann: "[PHP-DEV] CVS update: php3/functions"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

