8000 Issue #1865 · phpredis/phpredis@32be300 · GitHub
[go: up one dir, main page]

Skip to content

Commit 32be300

Browse files
committed
Issue #1865
Use "%.17g" sprintf format for doubles.
1 parent 39513ca commit 32be300

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

library.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -951,7 +951,7 @@ redis_cmd_append_sstr_dbl(smart_string *str, double value)
951951
int len;
952952

953953
/* Convert to string */
954-
len = snprintf(tmp, sizeof(tmp), "%.16g", value);
954+
len = snprintf(tmp, sizeof(tmp), "%.17g", value);
955955

956956
// Append the string
957957
return redis_cmd_append_sstr(str, tmp, len);

0 commit comments

Comments
 (0)
0