From 0528845c83aa520cc941659e59fc791a5d1d1c9f Mon Sep 17 00:00:00 2001 From: Rob Rix Date: Thu, 16 Mar 2017 15:24:08 -0400 Subject: [PATCH] =?UTF-8?q?Use=20the=20endpoint=E2=80=99s=20y=20value=20as?= =?UTF-8?q?=20the=20index=20into=20bs.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/SES/Myers.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/SES/Myers.hs b/src/SES/Myers.hs index 855927960..7d97c50f5 100644 --- a/src/SES/Myers.hs +++ b/src/SES/Myers.hs @@ -130,8 +130,8 @@ decompose myers = let ?callStack = popCallStack callStack in case myers of (prev, prevScript) <- getK graph direction (Diagonal (pred k)) (next, nextScript) <- getK graph direction (Diagonal (succ k)) let (fromX, fromScript) = if k == negate d || k /= d && prev < next - then (next, addInBounds bs next That nextScript) -- downward (insertion) - else (succ prev, addInBounds as prev This prevScript) -- rightward (deletion) + then (next, addInBounds bs (next - succ k) That nextScript) -- downward (insertion) + else (succ prev, addInBounds as prev This prevScript) -- rightward (deletion) (endpoint, script) <- slide graph direction (Endpoint fromX (fromX - k)) fromScript setK graph direction (Diagonal k) (x endpoint) script return $ case direction of