Skip to content

Commit fd66867

Browse files
authored
Merge pull request swiftlang#572 from swiftwasm/main
[pull] swiftwasm from main
2 parents 2797c38 + 7504fdf commit fd66867

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

Sources/FoundationXML/XMLParser.swift

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -603,10 +603,7 @@ open class XMLParser : NSObject {
603603
var result = true
604604
var chunkStart = 0
605605
var chunkEnd = min(_chunkSize, data.count)
606-
while result {
607-
if chunkStart >= data.count || chunkEnd >= data.count {
608-
break
609-
}
606+
while result && chunkStart < chunkEnd {
610607
let chunk = data[chunkStart..<chunkEnd]
611608
result = parseData(chunk)
612609
chunkStart = chunkEnd

0 commit comments

Comments
 (0)