mirror of
https://github.com/koalaman/shellcheck
synced 2025-08-22 14:23:53 -07:00
Fix off-by-one in overlap check for fixes
Previously if we have 2 ranges like: start: 6, end: 6 start: 6, end: 6 they would not be considered as overlap Fixes #1431
This commit is contained in:
parent
278ce56650
commit
71751f3144
1 changed files with 1 additions and 1 deletions
|
@ -10,7 +10,7 @@ class Ranged a where
|
|||
end :: a -> Position
|
||||
overlap :: a -> a -> Bool
|
||||
overlap x y =
|
||||
(yStart >= xStart && yStart < xEnd) || (yStart < xStart && yEnd > xStart)
|
||||
(yStart >= xStart && yStart <= xEnd) || (yStart < xStart && yEnd > xStart)
|
||||
where
|
||||
yStart = start y
|
||||
yEnd = end y
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue