aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn MacFarlane <fiddlosopher@gmail.com>2014-01-09 22:50:51 -0800
committerJohn MacFarlane <fiddlosopher@gmail.com>2014-01-09 22:51:23 -0800
commitb4b16d57865b1d951be79f04f8ad41fb70544077 (patch)
treef227408a5621cb0d13cf971854b0e4bf03ac0408
parentc26fd3556b70efe9e68b4f9cd6bb847dd35017ba (diff)
downloadpandoc-b4b16d57865b1d951be79f04f8ad41fb70544077.tar.gz
Minor improvement to exif parser.
-rw-r--r--src/Text/Pandoc/ImageSize.hs4
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