diff --git a/src/Rlp/Lex.x b/src/Rlp/Lex.x index 848983f..18592f8 100644 --- a/src/Rlp/Lex.x +++ b/src/Rlp/Lex.x @@ -115,7 +115,7 @@ alexGetByte inp = case inp ^. aiBytes of & aiPrevChar .~ c -- update the position & aiPos %~ \ (ln,col) -> - if (inp ^. aiPrevChar) == '\n' + if c == '\n' then (ln+1,1) else (ln,col+1) pure (b, inp')