From b4b16d57865b1d951be79f04f8ad41fb70544077 Mon Sep 17 00:00:00 2001 From: John MacFarlane Date: Thu, 9 Jan 2014 22:50:51 -0800 Subject: Minor improvement to exif parser. --- src/Text/Pandoc/ImageSize.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src') 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 -- cgit v1.2.3