mirror of
https://github.com/Jguer/yay
synced 2024-10-02 22:33:47 +00:00
Fix wrong loop indexing
This commit is contained in:
parent
1b8c9cea49
commit
35a7d504fa
6
query.go
6
query.go
|
@ -169,12 +169,12 @@ func narrowSearch(pkgS []string, sortS bool) (aurQuery, error) {
|
||||||
|
|
||||||
for i := range r {
|
for i := range r {
|
||||||
match := true
|
match := true
|
||||||
for i, pkgN := range pkgS {
|
for j, pkgN := range pkgS {
|
||||||
if usedIndex == i {
|
if usedIndex == j {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if !(strings.Contains(r[i].Name, pkgN) || strings.Contains(strings.ToLower(r[i].Description), pkgN)) {
|
if !(strings.Contains(r[j].Name, pkgN) || strings.Contains(strings.ToLower(r[j].Description), pkgN)) {
|
||||||
match = false
|
match = false
|
||||||
break
|
break
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue