diff --git a/Sources/Document+ParsingSupport.swift b/Sources/Document+ParsingSupport.swift index 5aaaf90..bc467b9 100644 --- a/Sources/Document+ParsingSupport.swift +++ b/Sources/Document+ParsingSupport.swift @@ -51,6 +51,10 @@ extension Document { let keyPos = position - keyPositionOffset if character == 0 { + if keyBytes.count != keyPos { + isKey = false + } + didEnd = true break keyComparison // end of key data } else if isKey && keyBytes.count > keyPos {