HCoop
/
bpt
/
emacs.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5fd4de1
)
(crlf_to_lf): Fix off-by-one condition.
author
Richard M. Stallman
<rms@gnu.org>
Sun, 15 May 1994 19:38:50 +0000
(19:38 +0000)
committer
Richard M. Stallman
<rms@gnu.org>
Sun, 15 May 1994 19:38:50 +0000
(19:38 +0000)
src/msdos.c
patch
|
blob
|
blame
|
history
diff --git
a/src/msdos.c
b/src/msdos.c
index
ad7d8b4
..
eb95a80
100644
(file)
--- a/
src/msdos.c
+++ b/
src/msdos.c
@@
-471,7
+471,7
@@
crlf_to_lf (n, buf)
if (n == 0)
return n;
- while (buf < endp)
+ while (buf < endp
- 1
)
{
if (*buf == 0x0d)
{
@@
-481,6
+481,8
@@
crlf_to_lf (n, buf)
else
*np++ = *buf++;
}
+ if (buf < endp)
+ *np++ = *buf++;
return np - startp;
}