diff --git a/src/t_hash.c b/src/t_hash.c index 2058dfd8..2f3487f6 100644 --- a/src/t_hash.c +++ b/src/t_hash.c @@ -159,7 +159,7 @@ size_t hashTypeGetValueLength(robj *o, robj *field) { robj *aux; if (hashTypeGetFromHashTable(o, field, &aux) == 0) - len = sdslen(aux->ptr); + len = stringObjectLen(aux); } else { redisPanic("Unknown hash encoding"); }