mirror of https://github.com/go-redis/redis.git
Merge pull request #1431 from mvrhov/patch-1
Prevent index out ouf bunds error
This commit is contained in:
commit
0ddc3abd36
|
@ -44,9 +44,10 @@ func (it *ScanIterator) Next(ctx context.Context) bool {
|
|||
}
|
||||
|
||||
// Fetch next page.
|
||||
if it.cmd.args[0] == "scan" {
|
||||
switch it.cmd.args[0] {
|
||||
case "scan", "qscan":
|
||||
it.cmd.args[1] = it.cmd.cursor
|
||||
} else {
|
||||
default:
|
||||
it.cmd.args[2] = it.cmd.cursor
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue