fons / cl-mongo

lisp interface to mongo db
fons.github.com/cl-mongo
MIT License
143 stars 31 forks source link

bson-decode incorrect for +bson-data-binary+ #8

Closed mbancroft closed 11 years ago

mbancroft commented 12 years ago

When grabbing the binary data from bson object offset should be offset from pos, else you're just grabbing a random chunk of bytes out of the object.

Fix is to calculate offset like so:

(offset (+ pos (if (eql type #x02) 9 5)))

fons commented 12 years ago

Hey thanks for the heads up.. feel free to fix :) I'll put in a fix over the weekend !!

fons commented 11 years ago

this has been fixed