summaryrefslogtreecommitdiff
path: root/sys/dev/syscons/scmouse.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/syscons/scmouse.c')
-rw-r--r--sys/dev/syscons/scmouse.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/sys/dev/syscons/scmouse.c b/sys/dev/syscons/scmouse.c
index 482b86fd5bb1..568bafd90402 100644
--- a/sys/dev/syscons/scmouse.c
+++ b/sys/dev/syscons/scmouse.c
@@ -482,6 +482,7 @@ mouse_cut_word(scr_stat *scp)
int eol;
int c;
int j;
+ int len;
/*
* Because we don't have locale information in the kernel,
@@ -525,6 +526,9 @@ mouse_cut_word(scr_stat *scp)
/* copy the found word */
mouse_do_cut(scp, start, end);
+ len = strlen(cut_buffer);
+ if (cut_buffer[len - 1] == '\r')
+ cut_buffer[len - 1] = '\0';
}
}