Fixed an endless loop in tty_write_to_tty() that happened if there was not enough
space left to write a '\r\n'. This fixes bug #80 and probably bug #477, too. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@17479 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
parent
04b1590767
commit
94f687f9e3
|
@ -1245,7 +1245,10 @@ tty_write_to_tty(tty_cookie *sourceCookie, const void *buffer, size_t *_length,
|
|||
// If we can't write both '\r' and '\n', we won't write either,
|
||||
// or we would write the '\r' again.
|
||||
if (writable < 2) {
|
||||
// try acquiring the writer again, when enough space is available
|
||||
bytesNeeded = 2;
|
||||
writable = 0;
|
||||
// make sure we're breaking out of this loop
|
||||
continue;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue