diff options
author | Stephen Paul Weber <singpolyma@singpolyma.net> | 2012-04-27 17:42:28 -0500 |
---|---|---|
committer | Stephen Paul Weber <singpolyma@singpolyma.net> | 2012-04-27 17:42:28 -0500 |
commit | fa19e9b7e8fab70d9c817890e7efe6918e49df74 (patch) | |
tree | 47939343739c44e8569c4fbf158190be9c7bcb4c /Data | |
parent | 35a71015787428c322a2f06068965cdff1f2f200 (diff) |
flags are bit fields
Diffstat (limited to 'Data')
-rw-r--r-- | Data/OpenPGP.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Data/OpenPGP.hs b/Data/OpenPGP.hs index 8128a2d..bf99198 100644 --- a/Data/OpenPGP.hs +++ b/Data/OpenPGP.hs | |||
@@ -845,7 +845,7 @@ parse_signature_subpacket 20 = do | |||
845 | name <- fmap B.toString $ getSomeByteString $ fromIntegral m | 845 | name <- fmap B.toString $ getSomeByteString $ fromIntegral m |
846 | value <- fmap B.toString $ getSomeByteString $ fromIntegral n | 846 | value <- fmap B.toString $ getSomeByteString $ fromIntegral n |
847 | return $ NotationDataPacket { | 847 | return $ NotationDataPacket { |
848 | human_readable = flag1 == 0x80, | 848 | human_readable = flag1 .&. 0x80 == 0x80, |
849 | notation_name = name, | 849 | notation_name = name, |
850 | notation_value = value | 850 | notation_value = value |
851 | } | 851 | } |
@@ -863,7 +863,7 @@ parse_signature_subpacket 23 = do | |||
863 | empty <- isEmpty | 863 | empty <- isEmpty |
864 | flag1 <- if empty then return 0 else get :: Get Word8 | 864 | flag1 <- if empty then return 0 else get :: Get Word8 |
865 | return $ KeyServerPreferencesPacket { | 865 | return $ KeyServerPreferencesPacket { |
866 | keyserver_no_modify = if flag1 == 0x80 then True else False | 866 | keyserver_no_modify = if flag1 .&. 0x80 == 0x80 then True else False |
867 | } | 867 | } |
868 | -- PreferredKeyServerPacket, http://tools.ietf.org/html/rfc4880#section-5.2.3.18 | 868 | -- PreferredKeyServerPacket, http://tools.ietf.org/html/rfc4880#section-5.2.3.18 |
869 | parse_signature_subpacket 24 = | 869 | parse_signature_subpacket 24 = |