mirror of
https://github.com/Llewellynvdm/fzf.git
synced 2024-11-15 17:57:07 +00:00
Modify loop conditions in checkAscii function
This commit is contained in:
parent
3e28403978
commit
99927c7071
@ -24,12 +24,12 @@ type Chars struct {
|
|||||||
|
|
||||||
func checkAscii(bytes []byte) (bool, int) {
|
func checkAscii(bytes []byte) (bool, int) {
|
||||||
i := 0
|
i := 0
|
||||||
for ; i < len(bytes)-8; i += 8 {
|
for ; i <= len(bytes)-8; i += 8 {
|
||||||
if (overflow64 & *(*uint64)(unsafe.Pointer(&bytes[i]))) > 0 {
|
if (overflow64 & *(*uint64)(unsafe.Pointer(&bytes[i]))) > 0 {
|
||||||
return false, i
|
return false, i
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for ; i < len(bytes)-4; i += 4 {
|
for ; i <= len(bytes)-4; i += 4 {
|
||||||
if (overflow32 & *(*uint32)(unsafe.Pointer(&bytes[i]))) > 0 {
|
if (overflow32 & *(*uint32)(unsafe.Pointer(&bytes[i]))) > 0 {
|
||||||
return false, i
|
return false, i
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user