Skip to content

Commit

Permalink
Handle \r without a \n in cygwin
Browse files Browse the repository at this point in the history
  • Loading branch information
ChrisJefferson committed Feb 27, 2019
1 parent 6692ca3 commit 5f6c67f
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/sysfiles.c
Original file line number Diff line number Diff line change
Expand Up @@ -1616,6 +1616,8 @@ static Int syGetchTerm(Int fid)
syBuf[fid].crlast = 1;
return (Int)'\n';
}
// We saw a '\r' without a '\n'
syBuf[fid].crlast = 0;
#endif /* line end hack */

/* return the character */
Expand Down Expand Up @@ -1676,6 +1678,8 @@ static Int syGetchNonTerm(Int fid)
syBuf[fid].crlast = 1;
return (Int)'\n';
}
// We saw a '\r' without a '\n'
syBuf[fid].crlast = 0;
#endif /* line end hack */

/* return the character */
Expand Down

0 comments on commit 5f6c67f

Please sign in to comment.