tony2001 Tue Aug 29 12:20:18 2006 UTC
Modified files: (Branch: PHP_5_2)
/php-src/ext/standard string.c
Log:
fix win32 build
EG(precision) can be changed in runtime, even in php_implode() (hint:
__toString()), so please think twice before optimizing
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/string.c?r1=1.445.2.14.2.15&r2=1.445.2.14.2.16&diff_format=u
Index: php-src/ext/standard/string.c
diff -u php-src/ext/standard/string.c:1.445.2.14.2.15
php-src/ext/standard/string.c:1.445.2.14.2.16
--- php-src/ext/standard/string.c:1.445.2.14.2.15 Mon Aug 28 23:33:37 2006
+++ php-src/ext/standard/string.c Tue Aug 29 12:20:18 2006
@@ -18,7 +18,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: string.c,v 1.445.2.14.2.15 2006/08/28 23:33:37 iliaa Exp $ */
+/* $Id: string.c,v 1.445.2.14.2.16 2006/08/29 12:20:18 tony2001 Exp $ */
/* Synced with php 3.0 revision 1.193 1999-06-16 [ssb] */
@@ -920,9 +920,11 @@
break;
case IS_DOUBLE: {
- char stmp[MAX_LENGTH_OF_DOUBLE + EG(precision)
+ 1];
+ char *stmp;
+ stmp = emalloc(MAX_LENGTH_OF_DOUBLE +
EG(precision) + 1);
str_len = sprintf(stmp, "%.*G", (int)
EG(precision), Z_DVAL_PP(tmp));
smart_str_appendl(&implstr, stmp, str_len);
+ efree(stmp);
}
break;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php