mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
Merge pull request #5400 from halaei/fix-dict-get-on-not-found
fix dict get on not found
This commit is contained in:
commit
1da93f85cc
@ -4419,7 +4419,7 @@ int RM_DictReplace(RedisModuleDict *d, RedisModuleString *key, void *ptr) {
|
||||
void *RM_DictGetC(RedisModuleDict *d, void *key, size_t keylen, int *nokey) {
|
||||
void *res = raxFind(d->rax,key,keylen);
|
||||
if (nokey) *nokey = (res == raxNotFound);
|
||||
return res;
|
||||
return (res == raxNotFound) ? NULL : res;
|
||||
}
|
||||
|
||||
/* Like RedisModule_DictGetC() but takes the key as a RedisModuleString. */
|
||||
|
Loading…
Reference in New Issue
Block a user