mirror of
https://github.com/github/semantic.git
synced 2024-12-22 14:21:31 +03:00
Bounds check x & y.
This commit is contained in:
parent
91694c4999
commit
a15ae4b2e0
@ -115,7 +115,9 @@ decompose myers = let ?callStack = popCallStack callStack in case myers of
|
|||||||
maxD = (m + n) `ceilDiv` 2
|
maxD = (m + n) `ceilDiv` 2
|
||||||
|
|
||||||
slide eq (Endpoint x y)
|
slide eq (Endpoint x y)
|
||||||
| (as Vector.! x) `eq` (bs Vector.! y) = slide eq (Endpoint (succ x) (succ y))
|
| x < length as
|
||||||
|
, y < length bs
|
||||||
|
, (as Vector.! x) `eq` (bs Vector.! y) = slide eq (Endpoint (succ x) (succ y))
|
||||||
| otherwise = Endpoint x y
|
| otherwise = Endpoint x y
|
||||||
|
|
||||||
FindDPath (EditGraph as bs) Reverse (EditDistance d) (Diagonal k) -> return (Endpoint 0 0)
|
FindDPath (EditGraph as bs) Reverse (EditDistance d) (Diagonal k) -> return (Endpoint 0 0)
|
||||||
|
Loading…
Reference in New Issue
Block a user