Fix list encoding

This commit is contained in:
Stefan Bühler 2010-06-23 14:01:11 +02:00
parent 61a2808d71
commit 2d46e5039e
1 changed files with 1 additions and 1 deletions

View File

@ -105,7 +105,7 @@ instance Encode a => Encode [a] where
_ -> fail "Unexpected end of stream"
sencode [] = [T0]
sencode [x] = T1:sencode x
sencode xs = (sencode $ length xs - 2) ++ concat (map sencode xs)
sencode xs = T2:T2:(sencode $ length xs - 2) ++ concat (map sencode xs)
instance Encode Int where
sdecode = do