enlarged buffer given to ld2string

This commit is contained in:
Guy Benoish
2017-01-11 19:24:19 +02:00
parent 634b096610
commit 56c01c959a
3 changed files with 7 additions and 2 deletions

View File

@ -145,7 +145,7 @@ robj *createStringObjectFromLongLong(long long value) {
*
* The 'humanfriendly' option is used for INCRBYFLOAT and HINCRBYFLOAT. */
robj *createStringObjectFromLongDouble(long double value, int humanfriendly) {
char buf[256];
char buf[MAX_LONG_DOUBLE_CHARS];
int len = ld2string(buf,sizeof(buf),value,humanfriendly);
return createStringObject(buf,len);
}