summaryrefslogtreecommitdiff
path: root/dpi/vsource.c
diff options
context:
space:
mode:
authorcorvid <corvid@lavabit.com>2012-09-25 17:53:30 +0000
committercorvid <corvid@lavabit.com>2012-09-25 17:53:30 +0000
commit5b4bea34b31acc2c108562e979c58271be57d6ee (patch)
tree9255e51c40e5aff015e529d3bf41063c9c9a935b /dpi/vsource.c
parentfde5aaf2188b4b6571d25dd8f8a29d98c7a213d0 (diff)
vsource: make send_numbered_text consistent with send_html_text
Diffstat (limited to 'dpi/vsource.c')
-rw-r--r--dpi/vsource.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/dpi/vsource.c b/dpi/vsource.c
index adf08a83..2f1129cb 100644
--- a/dpi/vsource.c
+++ b/dpi/vsource.c
@@ -78,9 +78,9 @@ void send_numbered_text(Dsh *sh, int data_size)
while (*p) {
snprintf(line_str, 32, "%2d: ", line);
a_Dpip_dsh_write_str(sh, 0, line_str);
- if ((p = strchr(q, '\n'))) {
+ if ((p = strpbrk(q, "\r\n"))) {
a_Dpip_dsh_write(sh, 0, q, p - q + 1);
- if (p[1] == '\r')
+ if (*p == '\r' && p[1] == '\n')
++p;
++line;
} else {