Skip to content
Snippets Groups Projects
Commit 337b2fce authored by Manish R Jain's avatar Manish R Jain
Browse files

Fix a bug due to handle negative offset

parent f80cd552
No related branches found
No related tags found
No related merge requests found
...@@ -734,6 +734,9 @@ func (l *List) GetUids(offset, count int) []uint64 { ...@@ -734,6 +734,9 @@ func (l *List) GetUids(offset, count int) []uint64 {
count = 0 - count count = 0 - count
offset = l.length() - count offset = l.length() - count
} }
if offset < 0 {
offset = 0
}
if count == 0 { if count == 0 {
count = l.length() - offset count = l.length() - offset
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment