Skip to content

Commit fa5d66c

Browse files
authored
Merge pull request #24175 from drodriguez/android-dont-append-negative-EOF
[android] Do not try to turn EOF into an UInt8
2 parents 5a27eb4 + 5835ceb commit fa5d66c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

validation-test/StdlibUnittest/Stdin.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,13 +18,13 @@ func simple_getline() -> [UInt8]? {
1818
var result = [UInt8]()
1919
while true {
2020
let c = getchar()
21-
result.append(UInt8(c))
2221
if c == EOF {
2322
if result.count == 0 {
2423
return nil
2524
}
2625
return result
2726
}
27+
result.append(UInt8(c))
2828
if c == CInt(UnicodeScalar("\n").value) {
2929
return result
3030
}

0 commit comments

Comments
 (0)