Skip to content

Commit 99f2fc8

Browse files
author
Ilia Alshanetsky
committed
Fixed a bug (introduced in previous patch) that caused non-double values to
be converted to 0 by printf/sprint functions when %f format is specified.
1 parent 9a9c1b4 commit 99f2fc8

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

ext/standard/formatted_print.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -605,6 +605,7 @@ php_formatted_print(int ht, int *len, int use_array TSRMLS_DC)
605605
case 'e':
606606
case 'f':
607607
/* XXX not done */
608+
convert_to_double_ex(args[argnum]);
608609
php_sprintf_appenddouble(&result, &outpos, &size,
609610
Z_DVAL_PP(args[argnum]),
610611
width, padding, alignment,

0 commit comments

Comments
 (0)