diff options
author | James Crayne <jim.crayne@gmail.com> | 2018-06-01 01:39:25 +0000 |
---|---|---|
committer | James Crayne <jim.crayne@gmail.com> | 2018-06-01 01:58:47 +0000 |
commit | 21a7ab498faa1273d367bba5f24d6ab4f7361214 (patch) | |
tree | 37dd0c414a52d7bfb2a361143d5910a7155c8df1 | |
parent | 86262384f4338bb64cca424bc1d444d29fc6b28c (diff) |
fix CryptoMessage seralizing issue
-rw-r--r-- | src/Network/Tox/Crypto/Transport.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/Network/Tox/Crypto/Transport.hs b/src/Network/Tox/Crypto/Transport.hs index 22a1b795..bc112078 100644 --- a/src/Network/Tox/Crypto/Transport.hs +++ b/src/Network/Tox/Crypto/Transport.hs | |||
@@ -237,8 +237,8 @@ instance Serialize CryptoMessage where | |||
237 | i <- get :: Get MessageID | 237 | i <- get :: Get MessageID |
238 | n <- remaining | 238 | n <- remaining |
239 | case msgSizeParam i of | 239 | case msgSizeParam i of |
240 | Just (True,1) -> return $ OneByte i | 240 | Just (True,0) -> return $ OneByte i |
241 | Just (True,2) -> TwoByte i <$> get | 241 | Just (True,1) -> TwoByte i <$> get |
242 | _ -> UpToN i <$> getByteString n | 242 | _ -> UpToN i <$> getByteString n |
243 | 243 | ||
244 | put (OneByte i) = putWord8 (fromIntegral . fromEnum $ i) | 244 | put (OneByte i) = putWord8 (fromIntegral . fromEnum $ i) |