Skip to content

Commit

Permalink
Issue #1865
Browse files Browse the repository at this point in the history
Use "%.17g" sprintf format for doubles.
  • Loading branch information
yatsukhnenko committed Oct 21, 2020
1 parent 39513ca commit 32be300
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion library.c
Original file line number Diff line number Diff line change
Expand Up @@ -951,7 +951,7 @@ redis_cmd_append_sstr_dbl(smart_string *str, double value)
int len;

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

// Append the string
return redis_cmd_append_sstr(str, tmp, len);
Expand Down

0 comments on commit 32be300

Please sign in to comment.