We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 73f116e commit dd3fb9bCopy full SHA for dd3fb9b
stdlib/public/core/StringUTF8.swift
@@ -455,7 +455,7 @@ extension String.UTF8View.Iterator : IteratorProtocol {
455
while _sourceIndex != _source.endIndex && shift < _OutputBuffer.bitWidth {
456
let u = _source[_sourceIndex]
457
if u >= 0x80 { break }
458
- _buffer |= _OutputBuffer(u &+ 1) &<< shift
+ _buffer |= _OutputBuffer(UInt8(extendingOrTruncating: u &+ 1)) &<< shift
459
_sourceIndex += 1
460
shift = shift &+ 8
461
}
0 commit comments