Merge pull request #1431 from mvrhov/patch-1

Prevent index out ouf bunds error
This commit is contained in:
Vladimir Mihailenco 2020-08-07 09:47:21 +03:00 committed by GitHub
commit 0ddc3abd36
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 2 deletions

View File

@ -44,9 +44,10 @@ func (it *ScanIterator) Next(ctx context.Context) bool {
} }
// Fetch next page. // Fetch next page.
if it.cmd.args[0] == "scan" { switch it.cmd.args[0] {
case "scan", "qscan":
it.cmd.args[1] = it.cmd.cursor it.cmd.args[1] = it.cmd.cursor
} else { default:
it.cmd.args[2] = it.cmd.cursor it.cmd.args[2] = it.cmd.cursor
} }