diff options
author | John MacFarlane <fiddlosopher@gmail.com> | 2014-01-09 22:50:51 -0800 |
---|---|---|
committer | John MacFarlane <fiddlosopher@gmail.com> | 2014-01-09 22:51:23 -0800 |
commit | b4b16d57865b1d951be79f04f8ad41fb70544077 (patch) | |
tree | f227408a5621cb0d13cf971854b0e4bf03ac0408 | |
parent | c26fd3556b70efe9e68b4f9cd6bb847dd35017ba (diff) | |
download | pandoc-b4b16d57865b1d951be79f04f8ad41fb70544077.tar.gz |
Minor improvement to exif parser.
-rw-r--r-- | src/Text/Pandoc/ImageSize.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Text/Pandoc/ImageSize.hs b/src/Text/Pandoc/ImageSize.hs index 467205220..d1aacff1c 100644 --- a/src/Text/Pandoc/ImageSize.hs +++ b/src/Text/Pandoc/ImageSize.hs @@ -234,8 +234,8 @@ exifHeader = do _ -> fail $ "Unknown data format " ++ show dataFormat let totalBytes = fromIntegral $ numComponents * bytesPerComponent payload <- if totalBytes <= 4 -- data is right here - then (fmt . BL.fromChunks . (:[])) <$> - (getByteString totalBytes <* + then fmt <$> + (getLazyByteString (fromIntegral totalBytes) <* skip (4 - totalBytes)) else do -- get data from offset offs <- getWord32 |