BsonSymbol had a similar utf8 length problem

This commit is contained in:
Scott R. Parish 2010-04-15 20:54:44 -05:00
parent cb223110e6
commit 78823834f4

View file

@ -315,7 +315,7 @@ putVal (BsonRegex r opt)= do putS r
putByteString $ pack $ List.sort opt
putNull
putVal (BsonJSCode c) = putStrSz c
putVal (BsonSymbol s) = putI32 (fromIntegral $ 1 + L8.length s) >> putS s
putVal (BsonSymbol s) = putStrSz s
putVal (BsonJSCodeWScope q s) =
let bytes = runPut (putStrSz q >> putObj s)
in putI32 ((+4) $ fromIntegral $ L.length bytes) >> putLazyByteString bytes