Commit 83bc861
authored
Don't truncate the last character in ttyname (#832)
CStr::len(), as used in backend::libc::termios::syscalls::ttyname, does
not include the trailing NUL. But CString::from_vec_with_nul_unchecked
requires the NUL to be present. Without it, it drops off the last
character from the string. This led to it returning paths like
"/dev/pts/" instead of "/dev/pts/8".
Tested on FreeBSD and Linux x86_641 parent 4358096 commit 83bc861
1 file changed
Lines changed: 2 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
54 | 54 | | |
55 | 55 | | |
56 | 56 | | |
57 | | - | |
| 57 | + | |
58 | 58 | | |
59 | | - | |
| 59 | + | |
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
| |||
0 commit comments