Skip to content

Commit

Permalink
Withhash normal output is integer except when stored when we should u…
Browse files Browse the repository at this point in the history
…se arrayItem.
  • Loading branch information
prvyk committed Mar 4, 2025
1 parent 670e4ab commit 84c56c9
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions libs/server/Objects/SortedSetGeo/SortedSetGeoObjectImpl.cs
Original file line number Diff line number Diff line change
Expand Up @@ -791,8 +791,16 @@ private void GeoSearch(ref ObjectInput input, ref SpanByteAndMemory output)

if (opts.withHash)
{
while (!RespWriteUtils.TryWriteArrayItem(item.GeoHash, ref curr, end))
ObjectUtils.ReallocateOutput(ref output, ref isMemory, ref ptr, ref ptrHandle, ref curr, ref end);
if (readOnlyCmd)
{
while (!RespWriteUtils.TryWriteInt64(item.GeoHash, ref curr, end))
ObjectUtils.ReallocateOutput(ref output, ref isMemory, ref ptr, ref ptrHandle, ref curr, ref end);
}
else
{
while (!RespWriteUtils.TryWriteArrayItem(item.GeoHash, ref curr, end))
ObjectUtils.ReallocateOutput(ref output, ref isMemory, ref ptr, ref ptrHandle, ref curr, ref end);
}
}

if (opts.withCoord)
Expand Down

0 comments on commit 84c56c9

Please sign in to comment.