From b0744d9160b5018b203f0b80239d48720a901cb4 Mon Sep 17 00:00:00 2001 From: tyghr <5499725+tyghr@users.noreply.github.com> Date: Thu, 24 Apr 2025 04:09:59 +0300 Subject: [PATCH] fix: Updating hash value would sometimes replace the entire hash https://github.com/EchoVault/SugarDB/issues/179 --- internal/modules/hash/commands.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/internal/modules/hash/commands.go b/internal/modules/hash/commands.go index 24e6790..7ed792a 100644 --- a/internal/modules/hash/commands.go +++ b/internal/modules/hash/commands.go @@ -79,7 +79,7 @@ func handleHSET(params internal.HandlerFuncParams) ([]byte, error) { // Handle HSET for field, value := range hash { if entries[field].Value == nil { - entries[field] = HashValue{Value: value} + entries[field] = value } } count = len(entries)