fix: Updating hash value would sometimes replace the entire hash

https://github.com/EchoVault/SugarDB/issues/179
This commit is contained in:
tyghr
2025-04-24 04:09:59 +03:00
committed by GitHub
parent d6d7d52c14
commit b0744d9160

View File

@@ -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)