Skip to content

Commit

Permalink
Important fix searchIdx function
Browse files Browse the repository at this point in the history
  • Loading branch information
night-codes committed Mar 20, 2018
1 parent 9987692 commit 20d9f82
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion sypex.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,8 +110,11 @@ func (f *finder) searchIdx(IPn, min, max uint32) uint32 {
max = offset
}
}
for IPn > uint32(f.S.MIndex[min]) && min < max {
for IPn > uint32(f.S.MIndex[min]) {
min++
if min > max {
break
}
}
return min
}
Expand Down

0 comments on commit 20d9f82

Please sign in to comment.