Skip to content

Commit

Permalink
- MFH: Removed trailing zeros on double to string conversion (noticed…
Browse files Browse the repository at this point in the history
… on #48924)
  • Loading branch information
felipensp committed Jul 16, 2009
1 parent ffe8409 commit 86101f6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ext/pdo/pdo_stmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ static int really_register_bound_param(struct pdo_bound_param_data *param, pdo_s
if (PDO_PARAM_TYPE(param->param_type) == PDO_PARAM_STR && param->max_value_len <= 0 && ! ZVAL_IS_NULL(param->parameter)) {
if (Z_TYPE_P(param->parameter) == IS_DOUBLE) {
char *p;
int len = spprintf(&p, 0, "%F", Z_DVAL_P(param->parameter));
int len = spprintf(&p, 0, "%.*H", (int) EG(precision), Z_DVAL_P(param->parameter));
ZVAL_STRINGL(param->parameter, p, len, 0);
} else {
convert_to_string(param->parameter);
Expand Down

0 comments on commit 86101f6

Please sign in to comment.