Fix bug in overlap check

This commit is contained in:
Ng Zhi An 2018-12-16 11:30:50 -08:00
parent 408a3b99d8
commit 3403f8d75b
1 changed files with 2 additions and 1 deletions

View File

@ -20,9 +20,10 @@ applyFix fix fileLines =
if overlap x y then x:(removeOverlap ys) else x:y:(removeOverlap ys)
-- two position overlaps when
overlap x y =
(yStart >= xStart && yStart <= xEnd) || (yStart < xStart && yStart > xStart)
(yStart >= xStart && yStart < xEnd) || (yStart < xStart && yEnd > xStart)
where
yStart = repStartPos y
yEnd = repEndPos y
xStart = repStartPos x
xEnd = repEndPos x