* fhandler_termios.cc (fhandler_termios::line_edit): Fix fatal typo in
bytes_read pointer checks.
This commit is contained in:
parent
73742508fc
commit
1243cefd78
|
@ -1,3 +1,8 @@
|
|||
2014-11-14 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* fhandler_termios.cc (fhandler_termios::line_edit): Fix fatal typo in
|
||||
bytes_read pointer checks.
|
||||
|
||||
2014-11-13 Corinna Vinschen <corinna@vinschen.de>
|
||||
|
||||
* fhandler.h (fhandler_termios::line_edit): Add parameter to return
|
||||
|
|
|
@ -243,7 +243,7 @@ fhandler_termios::line_edit (const char *rptr, size_t nread, termios& ti,
|
|||
bool sawsig = false;
|
||||
int iscanon = ti.c_lflag & ICANON;
|
||||
|
||||
if (*bytes_read)
|
||||
if (bytes_read)
|
||||
*bytes_read = nread;
|
||||
while (nread-- > 0)
|
||||
{
|
||||
|
@ -402,7 +402,7 @@ fhandler_termios::line_edit (const char *rptr, size_t nread, termios& ti,
|
|||
}
|
||||
|
||||
/* Adding one compensates for the postdecrement in the above loop. */
|
||||
if (*bytes_read)
|
||||
if (bytes_read)
|
||||
*bytes_read -= (nread + 1);
|
||||
|
||||
if (sawsig)
|
||||
|
|
Loading…
Reference in New Issue