Fixed SearcChar incorrect bounds in SearchChar aswell to avoid further

bugs
This commit is contained in:
2024-12-14 19:47:32 +02:00
parent a694b3916a
commit 23a1abf190

View File

@@ -21,7 +21,7 @@ func IsGrouped(r1, r2 rune) bool {
func SearchChar(line []rune, i, dir int, c rune) (index int, ok bool) {
found := false
for i > 0 && i < len(line) { // TODO: fix this, make sure it's i>=0
for i >= 0 && i < len(line) {
if line[i] == c {
found = true
break