Skip to content

Commit 57165ea

Browse files
committed
fix NSJSONSerialization for SE-0110
1 parent dbc9709 commit 57165ea

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Foundation/NSJSONSerialization.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -667,7 +667,7 @@ private struct JSONReader {
667667

668668
if source.encoding == String.Encoding.utf8 {
669669

670-
return parseTypedNumber(source.buffer.baseAddress!.advanced(by: input), count: source.buffer.count - input).map { return ($0.0, input + $0.1) }
670+
return parseTypedNumber(source.buffer.baseAddress!.advanced(by: input), count: source.buffer.count - input).map { return ($0, input + $1) }
671671
}
672672
else {
673673
var numberCharacters = [UInt8]()
@@ -681,7 +681,7 @@ private struct JSONReader {
681681

682682
return numberCharacters.withUnsafeBufferPointer {
683683
parseTypedNumber($0.baseAddress!, count: $0.count)
684-
}.map { return ($0.0, index) }
684+
}.map { any, _ in return (any, index) }
685685
}
686686
}
687687

0 commit comments

Comments
 (0)