pajoye Wed Aug 23 20:22:31 2006 UTC
Modified files: (Branch: PHP_5_2)
/php-src NEWS
/php-src/ext/gd/libgd gdft.c
Log:
- MFH: add support for entities in hexadecimal format, like © can
be passed as © or © (sync with gd)
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.216&r2=1.2027.2.547.2.217&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.216 php-src/NEWS:1.2027.2.547.2.217
--- php-src/NEWS:1.2027.2.547.2.216 Wed Aug 23 13:00:48 2006
+++ php-src/NEWS Wed Aug 23 20:22:31 2006
@@ -1,6 +1,8 @@
PHP NEWS
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
?? Sep 2006, PHP 5.2.0
+- Added support for hexadecimal entity in imagettftext() for the bundled GD.
+ (Pierre)
- Fixed bug #38543 (shutdown_executor() may segfault when memory_limit is too
low). (Dmitry)
- Fixed bug #38535 (memory corruption in pdo_pgsql driver on error retrieval
http://cvs.php.net/viewvc.cgi/php-src/ext/gd/libgd/gdft.c?r1=1.36&r2=1.36.4.1&diff_format=u
Index: php-src/ext/gd/libgd/gdft.c
diff -u php-src/ext/gd/libgd/gdft.c:1.36 php-src/ext/gd/libgd/gdft.c:1.36.4.1
--- php-src/ext/gd/libgd/gdft.c:1.36 Sat Nov 20 13:09:45 2004
+++ php-src/ext/gd/libgd/gdft.c Wed Aug 23 20:22:31 2006
@@ -207,12 +207,28 @@
byte = *((unsigned char *) (str + 1));
if (byte == '#') {
- for (i = 2; i < 8; i++) {
- byte = *((unsigned char *) (str + i));
- if (byte >= '0' && byte <= '9') {
- n = (n * 10) + (byte - '0');
- } else {
- break;
+ byte = *((unsigned char *) (str + 2));
+ if (byte == 'x' || byte == 'X') {
+ for (i = 3; i < 8; i++) {
+ byte = *((unsigned char *) (str + i));
+ if (byte >= 'A' && byte <= 'F')
+ byte = byte - 'A' + 10;
+ else if (byte >= 'a' && byte <= 'f')
+ byte = byte - 'a' + 10;
+ else if (byte >= '0' && byte <= '9')
+ byte = byte - '0';
+ else
+ break;
+ n = (n * 16) + byte;
+ }
+ } else {
+ for (i = 2; i < 8; i++) {
+ byte = *((unsigned char *) (str + i));
+ if (byte >= '0' && byte <= '9') {
+ n = (n * 10) + (byte - '0');
+ } else {
+ break;
+ }
}
}
if (byte == ';') {
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php