Revert "getline: check if newline at the end to not cut end of line"
This reverts commit d24be8cf6c
.
pull/691/head
parent
f6a401aa02
commit
bda50e96f0
6
os/os.v
6
os/os.v
|
@ -415,11 +415,7 @@ pub fn get_line() string {
|
||||||
if nr_chars == 0 {
|
if nr_chars == 0 {
|
||||||
return ''
|
return ''
|
||||||
}
|
}
|
||||||
if buf[nr_chars - 1] == `\n` /* newline */ {
|
return tos(buf, nr_chars - 1)
|
||||||
return tos(buf, nr_chars - 1)
|
|
||||||
}
|
|
||||||
/* To prevent cutting end of line if no newline */
|
|
||||||
return tos(buf, nr_chars)
|
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn user_os() string {
|
pub fn user_os() string {
|
||||||
|
|
Loading…
Reference in New Issue