Skip to content

Commit

Permalink
e2e test service: fix array bounds comparison
Browse files Browse the repository at this point in the history
  • Loading branch information
panchoh committed Mar 8, 2019
1 parent 7f6e235 commit 887db73
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/e2e/test_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func (s *snapStore) Get(version uint64) *protocol.SignedSnapshot {
s.Lock()
defer s.Unlock()
targetSegment := version / segmentSize
if targetSegment > uint64(len(s.segments)) {
if targetSegment >= uint64(len(s.segments)) {
return nil
}
targetIndex := version - (targetSegment * segmentSize)
Expand Down

0 comments on commit 887db73

Please sign in to comment.