mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-23 00:28:26 -05:00
Fix for a possible bug related to ZINTER/UNIONSTORE called with the same source set more than one time.
This commit is contained in:
parent
dd1eefa4f3
commit
d070abe44c
@ -1521,7 +1521,10 @@ void zunionInterGenericCommand(redisClient *c, robj *dstkey, int op) {
|
||||
|
||||
score = src[0].weight * zval.score;
|
||||
for (j = 1; j < setnum; j++) {
|
||||
if (zuiFind(&src[j],&zval,&value)) {
|
||||
if (src[j].subject == src[0].subject) {
|
||||
value = zval.score*src[j].weight;
|
||||
zunionInterAggregate(&score,value,aggregate);
|
||||
} else if (zuiFind(&src[j],&zval,&value)) {
|
||||
value *= src[j].weight;
|
||||
zunionInterAggregate(&score,value,aggregate);
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user