iliaa Sat Oct 26 18:18:40 2002 EDT
Modified files:
/php4/ext/standard formatted_print.c
Log:
Better fix for bug #20108.
Index: php4/ext/standard/formatted_print.c
diff -u php4/ext/standard/formatted_print.c:1.58
php4/ext/standard/formatted_print.c:1.59
--- php4/ext/standard/formatted_print.c:1.58 Sat Oct 26 16:45:17 2002
+++ php4/ext/standard/formatted_print.c Sat Oct 26 18:18:40 2002
@@ -16,7 +16,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: formatted_print.c,v 1.58 2002/10/26 20:45:17 iliaa Exp $ */
+/* $Id: formatted_print.c,v 1.59 2002/10/26 22:18:40 iliaa Exp $ */
#include <math.h> /* modf() */
#include "php.h"
@@ -159,6 +159,10 @@
{
register int npad;
+ if (max_width && min_width) {
+ expprec = max_width = 0;
+ }
+
npad = min_width - MIN(len, (expprec ? max_width : len));
if (npad < 0) {
@@ -605,10 +609,10 @@
convert_to_string_ex(args[argnum]);
php_sprintf_appendstring(&result, &outpos,
&size,
Z_STRVAL_PP(args[argnum]),
-
width, 0, padding,
+
+ width, precision, padding,
alignment,
Z_STRLEN_PP(args[argnum]),
-
0, 0);
+
+ 0, expprec);
break;
case 'd':
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php