repochecker/grammalecte: Fix odd slice bounds out of range
This commit is contained in:
parent
ae1378780f
commit
4b8e447b1b
1 changed files with 1 additions and 1 deletions
|
@ -187,7 +187,7 @@ func grammalecte(name string, text string, exceptions *sync.CheckExceptions, opt
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
if gerror.RuleId == "mc_mot_composé" && exceptions.HasException(fmt.Sprintf(":spelling:%s", data.Text[gerror.Start+1:gerror.End+1])) {
|
if gerror.RuleId == "mc_mot_composé" && gerror.End+1 < len(data.Text) && gerror.Start+1 < len(data.Text) && exceptions.HasException(fmt.Sprintf(":spelling:%s", data.Text[gerror.Start+1:gerror.End+1])) {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Reference in a new issue