mirror of
https://codeberg.org/redict/redict.git
synced 2025-01-22 16:18:28 -05:00
BITFIELD: Farest bit set is offset+bits-1. Off by one error fixed.
This commit is contained in:
parent
9a00da0d14
commit
fc843784c3
@ -964,8 +964,10 @@ void bitfieldCommand(client *c) {
|
||||
* for simplicity. SET return value is the previous value so
|
||||
* we need fetch & store as well. */
|
||||
|
||||
if ((o = lookupStringForBitCommand(c,thisop->offset + thisop->bits))
|
||||
== NULL) return;
|
||||
/* Lookup by making room up to the farest bit reached by
|
||||
* this operation. */
|
||||
if ((o = lookupStringForBitCommand(c,
|
||||
thisop->offset + (thisop->bits-1))) == NULL) return;
|
||||
|
||||
/* We need two different but very similar code paths for signed
|
||||
* and unsigned operations, since the set of functions to get/set
|
||||
|
Loading…
Reference in New Issue
Block a user