Skip to content

Commit

Permalink
fix(serializer): ensure RegExp options are alphabetically sorted
Browse files Browse the repository at this point in the history
  • Loading branch information
mbroadst committed Feb 28, 2018
1 parent 604831b commit d60659d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/bson/parser/serializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -201,8 +201,8 @@ var serializeRegExp = function(buffer, key, value, index, isArray) {
// Write zero
buffer[index++] = 0x00;
// Write the parameters
if (value.global) buffer[index++] = 0x73; // s
if (value.ignoreCase) buffer[index++] = 0x69; // i
if (value.global) buffer[index++] = 0x73; // s
if (value.multiline) buffer[index++] = 0x6d; // m

// Add ending zero
Expand Down

0 comments on commit d60659d

Please sign in to comment.