Skip to content

Commit

Permalink
Merge commit '57b66d610c0c442f7c4351570953cd426c2bc8fd' into HEAD
Browse files Browse the repository at this point in the history
  • Loading branch information
Joannis committed Jun 16, 2017
2 parents c35549a + 57b66d6 commit 8bc6dab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion Sources/BSON/Document.swift
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ public struct Document : Collection, ExpressibleByDictionaryLiteral, Expressible

guard length <= data.count, data.last == 0x00 else {
invalid = true
storage = Array(data[4..<data.count &- 1])
storage = Array(data[data.startIndex.advanced(by: 4)..<data.endIndex.advanced(by: -1)])
return
}

Expand Down

0 comments on commit 8bc6dab

Please sign in to comment.