Skip to content

Commit

Permalink
found a bug w/ @sunflailOOH
Browse files Browse the repository at this point in the history
  • Loading branch information
brozeph committed Apr 1, 2021
1 parent 5504068 commit b703d2f
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion bsonTypes.go
Original file line number Diff line number Diff line change
Expand Up @@ -332,10 +332,14 @@ func detectStringComparisonOperator(field string, values []string, bsonType stri
ne := false

// check for prefix/suffix on the value string
if len(value) > 2 {
if len(value) > 1 {
bw = value[len(value)-1:] == "*"
ew = value[0:1] == "*"
c = bw && ew
}

// check for != or string in quotes
if len(value) > 2 {
ne = value[0:2] == "!="
em = value[0:1] == "\"" &&
value[len(value)-1:] == "\""
Expand Down

0 comments on commit b703d2f

Please sign in to comment.