Skip to content

Commit 2e1a03c

Browse files
committed
fix problem upon converting score to string
1 parent f8f552e commit 2e1a03c

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

redis.c

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3662,8 +3662,7 @@ PHP_METHOD(Redis, zAdd) {
36623662

36633663
/* add score */
36643664
score = Z_DVAL_P(z_args[i]);
3665-
dbl_str = _php_math_number_format(score, 8, '.', '\x00');
3666-
dbl_len = strlen(dbl_str);
3665+
dbl_len = spprintf(&dbl_str, 0, "%.8f", score);
36673666
smart_str_appendc(&buf, '$');
36683667
smart_str_append_long(&buf, dbl_len);
36693668
smart_str_appendl(&buf, _NL, sizeof(_NL) - 1);

0 commit comments

Comments
 (0)