Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] GETRANGE returns incorrect response with negative indices #13207

Closed
Yury-Fridlyand opened this issue Apr 13, 2024 · 2 comments
Closed

[BUG] GETRANGE returns incorrect response with negative indices #13207

Yury-Fridlyand opened this issue Apr 13, 2024 · 2 comments

Comments

@Yury-Fridlyand
Copy link

Describe the bug
GETRANGE mykey -200 -100 returns a non-empty string

redis> GETRANGE mykey -200 -100
"T"

To reproduce

  1. Go to https://redis.io/docs/latest/commands/getrange/
  2. Submit GETRANGE mykey -200 -100

Expected behavior

Should return an empty string due to incorrect range specified

Additional information

Reproduced on 7.2.4

Bonus

redis> getrange mykey -0 2
(error) value is not an integer or out of range
@sundb
Copy link
Collaborator

sundb commented Apr 13, 2024

thanks, it's fixed in #12272

@Yury-Fridlyand
Copy link
Author

good news! Sorry, I failed to find that.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants