summaryrefslogtreecommitdiff
path: root/src/networking.c
diff options
context:
space:
mode:
authorOran Agra <oran@redislabs.com>2019-11-03 16:42:31 +0200
committerOran Agra <oran@redislabs.com>2019-11-03 16:42:31 +0200
commit779aebc91cd8d3043ab172e0bc5b8c988df88e33 (patch)
tree803c68ed0f77f8b9abd01e200022a310876d9712 /src/networking.c
parentfdaea2a7a7eed1499f46bb98552f8d8bb8dc7e9d (diff)
downloadredis-779aebc91cd8d3043ab172e0bc5b8c988df88e33.tar.gz
Module API for loading and saving long double
looks like each platform implements long double differently (different bit count) so we can't save them as binary, and we also want to avoid creating a new RDB format version, so we save these are hex strings using "%La". This commit includes a change in the arguments of ld2string to support this. as well as tests for coverage and short reads. coded by @guybe7
Diffstat (limited to 'src/networking.c')
-rw-r--r--src/networking.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/networking.c b/src/networking.c
index e7cc561fa..428ab14ce 100644
--- a/src/networking.c
+++ b/src/networking.c
@@ -530,7 +530,7 @@ void addReplyHumanLongDouble(client *c, long double d) {
decrRefCount(o);
} else {
char buf[MAX_LONG_DOUBLE_CHARS];
- int len = ld2string(buf,sizeof(buf),d,1);
+ int len = ld2string(buf,sizeof(buf),d,LD_STR_HUMAN);
addReplyProto(c,",",1);
addReplyProto(c,buf,len);
addReplyProto(c,"\r\n",2);