Fix bug preventing startXref to be found for files with a single byte EOL encoding

This commit is contained in:
Tissevert 2019-05-13 11:34:15 +02:00
parent c036334b6f
commit 6eacb55fc4
1 changed files with 1 additions and 1 deletions

View File

@ -182,7 +182,7 @@ readStartXref eolStyle input =
BS.length input - BS.length eofMarker
- if BS.last input == BS.last eofMarker then 0 else eolOffset
startXrefPosition =
previous eolLastByte (eofMarkerPosition - eolOffset) input + 1
previous eolLastByte (eofMarkerPosition - eolOffset - 1) input + 1
startXrefLength = eofMarkerPosition - eolOffset - startXrefPosition
parseDocument :: ByteString -> Either ParseError Document