diff options
Diffstat (limited to 'apps')
-rw-r--r-- | apps/misc.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/apps/misc.c b/apps/misc.c index 3bee0772a6..5b20b35c17 100644 --- a/apps/misc.c +++ b/apps/misc.c | |||
@@ -198,6 +198,13 @@ int fast_readline(int fd, char *buf, int buf_size, void *parameters, | |||
198 | next = ++p; | 198 | next = ++p; |
199 | } | 199 | } |
200 | 200 | ||
201 | if ( (p = strchr(buf, '\r')) != NULL) | ||
202 | { | ||
203 | *p = '\0'; | ||
204 | if (!next) | ||
205 | next = ++p; | ||
206 | } | ||
207 | |||
201 | rc = callback(count, buf, parameters); | 208 | rc = callback(count, buf, parameters); |
202 | if (rc < 0) | 209 | if (rc < 0) |
203 | return rc; | 210 | return rc; |