Mercurial > emacs
diff src/msdos.c @ 7507:b393834bab2a
(crlf_to_lf): Fix off-by-one condition.
| author | Richard M. Stallman <rms@gnu.org> |
|---|---|
| date | Sun, 15 May 1994 19:38:50 +0000 |
| parents | 24426d7e14eb |
| children | 8994727ff976 |
line wrap: on
line diff
--- a/src/msdos.c Sun May 15 19:25:21 1994 +0000 +++ b/src/msdos.c Sun May 15 19:38:50 1994 +0000 @@ -471,7 +471,7 @@ if (n == 0) return n; - while (buf < endp) + while (buf < endp - 1) { if (*buf == 0x0d) { @@ -481,6 +481,8 @@ else *np++ = *buf++; } + if (buf < endp) + *np++ = *buf++; return np - startp; }
