X-Git-Url: https://git.saurik.com/redis.git/blobdiff_plain/0f9997845af236097c8802771cca3cff84c4e77b..4b1f6ad3e7a5c7c28618e43e7539c9a937bf8521:/src/util.c?ds=sidebyside diff --git a/src/util.c b/src/util.c index bcdafc63..e3224f50 100644 --- a/src/util.c +++ b/src/util.c @@ -7,6 +7,7 @@ #include #include #include +#include #include "util.h" @@ -319,7 +320,7 @@ int d2string(char *buf, size_t len, double value) { * integer printing function that is much faster. */ double min = -4503599627370495; /* (2^52)-1 */ double max = 4503599627370496; /* -(2^52) */ - if (val > min && val < max && value == ((double)((long long)value))) + if (value > min && value < max && value == ((double)((long long)value))) len = ll2string(buf,len,(long long)value); else #endif