Fix re-write of config file by preserving line endings

This commit is contained in:
Ron Pedde 2007-09-03 17:48:56 +00:00
parent cab9a1ecd0
commit 839f500358
1 changed files with 2 additions and 2 deletions

View File

@ -913,8 +913,8 @@ int io_readline_timeout(IO_PRIVHANDLE *phandle, unsigned char *buf,
if((!ascii) || (to_read != '\r')) {
numread += to_read;
if(buf[numread-1] == '\n') {
buf[numread-1] = '\0';
*len = numread;
buf[numread] = '\0'; /* retain the CR */
*len = numread+1;
return TRUE;
}
if(!to_read) { /* EOF */