Skip to content

Commit

Permalink
Merge pull request #260 from biozic/master
Browse files Browse the repository at this point in the history
Fix inversion in writeBson for bools.
  • Loading branch information
s-ludwig committed Jul 10, 2013
2 parents e621634 + 5153a89 commit 292afb0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/vibe/data/bson.d
Original file line number Diff line number Diff line change
Expand Up @@ -1079,7 +1079,7 @@ private Bson.Type writeBson(R)(ref R dst, in Json value)
case Json.Type.Null:
return Bson.Type.Null;
case Json.Type.Bool:
dst.put(cast(ubyte)(cast(bool)value ? 0x00 : 0x01));
dst.put(cast(ubyte)(cast(bool)value ? 0x01 : 0x00));
return Bson.Type.Bool;
case Json.Type.Int:
auto v = cast(long)value;
Expand Down

0 comments on commit 292afb0

Please sign in to comment.