Skip to content

Commit

Permalink
Fix error in mongotcl_arraytobson where it would return after any fie…
Browse files Browse the repository at this point in the history
…ld found in the data types array. (It should process all elements of the data array before returning.)

BUGZID:
  • Loading branch information
lehenbauer committed Feb 19, 2014
1 parent 547b0db commit 996e7dd
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion generic/bson.c
Original file line number Diff line number Diff line change
Expand Up @@ -784,7 +784,9 @@ mongotcl_arraytobson(Tcl_Interp *interp, Tcl_Obj *listObj, char *typeArrayName,

// it is there, append element according to the type specified
// in the type array
return mongotcl_appendBsonFromObjects(interp, mybson, typeObj, key, valueObj);
if (mongotcl_appendBsonFromObjects(interp, mybson, typeObj, key, valueObj) != TCL_OK) {
return mongotcl_setBsonError (interp, mybson);
}
}
}

Expand Down

0 comments on commit 996e7dd

Please sign in to comment.