diff options
author | antirez <antirez@gmail.com> | 2019-12-18 12:54:46 +0100 |
---|---|---|
committer | antirez <antirez@gmail.com> | 2019-12-18 12:54:46 +0100 |
commit | e6e58e455c1adce82592a5dcf276dd8083088e2b (patch) | |
tree | a6078cbe93a2fae848b7297a383c81dd1376ddb3 /src/geo.c | |
parent | 5b9d3ac6c6932b292c8895af8562c4df3c00464b (diff) | |
download | redis-e6e58e455c1adce82592a5dcf276dd8083088e2b.tar.gz |
Revert "Geo: output 10 chars of geohash, not 11."
This reverts commit 009862ab7eee394061eeaf1aa187fa339ca50be4.
Diffstat (limited to 'src/geo.c')
-rw-r--r-- | src/geo.c | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -734,14 +734,14 @@ void geohashCommand(client *c) { r[1].max = 90; geohashEncode(&r[0],&r[1],xy[0],xy[1],26,&hash); - char buf[11]; + char buf[12]; int i; - for (i = 0; i < 10; i++) { + for (i = 0; i < 11; i++) { int idx = (hash.bits >> (52-((i+1)*5))) & 0x1f; buf[i] = geoalphabet[idx]; } - buf[10] = '\0'; - addReplyBulkCBuffer(c,buf,10); + buf[11] = '\0'; + addReplyBulkCBuffer(c,buf,11); } } } |