repochecker/grammalecte: Fix odd slice bounds out of range
This commit is contained in:
parent
ae1378780f
commit
4b8e447b1b
|
@ -187,7 +187,7 @@ func grammalecte(name string, text string, exceptions *sync.CheckExceptions, opt
|
|||
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
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue