From 7054661a7ddfc18ca9fd63ae996e73799abfee07 Mon Sep 17 00:00:00 2001 From: George Agapov Date: Mon, 16 Jan 2017 01:09:22 +0300 Subject: [PATCH] [CSL-585] Fix for attributes, fixed --- src/Pos/Data/Attributes.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Pos/Data/Attributes.hs b/src/Pos/Data/Attributes.hs index c225630a3bb..d59506850a2 100644 --- a/src/Pos/Data/Attributes.hs +++ b/src/Pos/Data/Attributes.hs @@ -78,8 +78,8 @@ getAttributes keyGetMapper (fromIntegral -> maxLen) initData = do fail $ "Attributes: wrong totalLen " ++ show totalLen ++ " (maxLen=" ++ show maxLen ++ ")" read1 <- G.bytesRead - let cond = orM [ G.isEmpty - , (\r -> r - read1 >= totalLen) <$> G.bytesRead ] + let cond = orM [ (\r -> r - read1 >= totalLen) <$> G.bytesRead + , G.isEmpty] readWhileKnown dat = ifM cond (return dat) $ do key <- G.lookAhead getWord8 case keyGetMapper key dat of