From c75f865cd15de2443e55ca2189add717c01d4cef Mon Sep 17 00:00:00 2001 From: Adrian Cochrane Date: Wed, 23 Nov 2022 13:56:36 +1300 Subject: [PATCH] Correct FcType (and in turn FcValue) decoding. --- Graphics/Text/Font/Choose/Value.hs | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/Graphics/Text/Font/Choose/Value.hs b/Graphics/Text/Font/Choose/Value.hs index f546501..2fdbd5a 100644 --- a/Graphics/Text/Font/Choose/Value.hs +++ b/Graphics/Text/Font/Choose/Value.hs @@ -106,21 +106,22 @@ thawValue ptr = do 3 -> do val <- throwNull <$> peek val' Just <$> ValueString <$> peekCString val - 4 -> do + 4 -> Just <$> ValueBool <$> peek val' + 5 -> do mat' <- throwNull <$> peek val' xx <- peekElemOff mat' 0 xy <- peekElemOff mat' 1 yx <- peekElemOff mat' 2 yy <- peekElemOff mat' 3 - return $ Just $ ValueMatrix $ V2 (V2 xx yx) (V2 xy yy) - 5 -> do + return $ Just $ ValueMatrix $ V2 (V2 xx xy) (V2 yx yy) + 6 -> do val <- throwNull <$> peek val' Just <$> ValueCharSet <$> thawCharSet val - 6 -> Just <$> ValueFTFace <$> throwNull <$> peek val' - 7 -> do + 7 -> Just <$> ValueFTFace <$> throwNull <$> peek val' + 8 -> do val <- throwNull <$> peek val' Just <$> ValueLangSet <$> thawLangSet val - 8 -> do + 9 -> do val <- throwNull <$> peek val' Just <$> ValueRange <$> thawRange val _ -> return Nothing -- 2.30.2