diff --git a/src/Chainweb/Pact5/TransactionExec.hs b/src/Chainweb/Pact5/TransactionExec.hs index 1b13344e1..72bf48280 100644 --- a/src/Chainweb/Pact5/TransactionExec.hs +++ b/src/Chainweb/Pact5/TransactionExec.hs @@ -726,7 +726,9 @@ enrichedMsgBodyForGasPayer cmd = case (_pPayload $ _cmdPayload cmd) of -- Drop until the start line, and take (endLine - startLine). Note: -- Span info locations are absolute, so `endLine` is not relative to start line, but -- relative to the whole file. - lineSpan = take (endLine - startLine) $ drop startLine code + -- + -- Note: we take `end - start + 1` since end is inclusive. + lineSpan = take (endLine - startLine + 1) $ drop startLine code in T.concat (over _head (T.drop startCol) . over _last (T.take endCol) $ lineSpan) Continuation cont -> PObject $ Map.fromList