ignore empty lines in the password additional fields

This commit is contained in:
Bob Sun 2017-02-20 17:43:04 +08:00
parent 68d4df55c3
commit 663ccd1a85
No known key found for this signature in database
GPG key ID: 1F86BA2052FED3B4

View file

@ -50,6 +50,9 @@ class Password {
var unknownIndex = 0
additionFieldsPlainText.enumerateLines() { line, _ in
if line == "" {
return
}
let items = line.characters.split(separator: ":", maxSplits: 1, omittingEmptySubsequences: true).map(String.init)
var key = ""
var value = ""