mirror of https://github.com/ledisdb/ledisdb.git
Update t_list.go
This commit is contained in:
parent
8003229696
commit
df27eeedec
|
@ -346,7 +346,9 @@ func (db *DB) LSet(key []byte, index int32, value []byte) error {
|
||||||
} else {
|
} else {
|
||||||
seq = tailSeq + index + 1
|
seq = tailSeq + index + 1
|
||||||
}
|
}
|
||||||
|
if seq < headSeq || seq > tailSeq {
|
||||||
|
return errListIndex
|
||||||
|
}
|
||||||
sk := db.lEncodeListKey(key, seq)
|
sk := db.lEncodeListKey(key, seq)
|
||||||
t.Put(sk, value)
|
t.Put(sk, value)
|
||||||
err = t.Commit()
|
err = t.Commit()
|
||||||
|
|
Loading…
Reference in New Issue