summaryrefslogtreecommitdiff
path: root/src/geo.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/geo.c')
-rw-r--r--src/geo.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/geo.c b/src/geo.c
index f47f4ee22..049335a4f 100644
--- a/src/geo.c
+++ b/src/geo.c
@@ -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[12];
+ char buf[11];
int i;
- for (i = 0; i < 11; i++) {
+ for (i = 0; i < 10; i++) {
int idx = (hash.bits >> (52-((i+1)*5))) & 0x1f;
buf[i] = geoalphabet[idx];
}
- buf[11] = '\0';
- addReplyBulkCBuffer(c,buf,11);
+ buf[10] = '\0';
+ addReplyBulkCBuffer(c,buf,10);
}
}
}