diff options
Diffstat (limited to 'src')
-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) |