From 78823834f442a77dc3017edec1e33a563d0a2df3 Mon Sep 17 00:00:00 2001 From: "Scott R. Parish" Date: Thu, 15 Apr 2010 20:54:44 -0500 Subject: [PATCH] BsonSymbol had a similar utf8 length problem --- Database/MongoDB/BSON.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Database/MongoDB/BSON.hs b/Database/MongoDB/BSON.hs index 7dba909..830ce37 100644 --- a/Database/MongoDB/BSON.hs +++ b/Database/MongoDB/BSON.hs @@ -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