(termio) [_WIN32]: Change remaining "n"s to "records" for the
WIN32 ReadConsole(). Fixes broken exec command. Broken in Rev 1.17.
This commit is contained in:
parent
1bd3b7264d
commit
9e3825ee46
1 changed files with 6 additions and 6 deletions
|
@ -107,7 +107,7 @@ termio(int fd, int sock, FILE *auxfi)
|
|||
|
||||
if (c == 13)
|
||||
c = 10;
|
||||
n = 1;
|
||||
records = 1;
|
||||
p[0] = c;
|
||||
p[1] = '\0';
|
||||
if (c != 10) {
|
||||
|
@ -120,11 +120,11 @@ termio(int fd, int sock, FILE *auxfi)
|
|||
} else
|
||||
putchar(c);
|
||||
/* Strip off the CRLF to just LF */
|
||||
if (n > 1) {
|
||||
if (p[n - 2] == 13 && p[n - 1] == 10) {
|
||||
p[n - 2] = 10;
|
||||
p[n - 1] = 0;
|
||||
n--;
|
||||
if (records > 1) {
|
||||
if (p[records - 2] == 13 && p[records - 1] == 10) {
|
||||
p[records - 2] = 10;
|
||||
p[records - 1] = 0;
|
||||
records--;
|
||||
}
|
||||
}
|
||||
FlushConsoleInputBuffer(hStdIn);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue