diff --git a/src/Rlp/Lex.x b/src/Rlp/Lex.x index 7f5b292..589d6bb 100644 --- a/src/Rlp/Lex.x +++ b/src/Rlp/Lex.x @@ -133,7 +133,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')