summaryrefslogtreecommitdiff
path: root/common/uart_buffering.c
diff options
context:
space:
mode:
authorVic Yang <victoryang@chromium.org>2012-07-30 11:47:03 +0800
committerGerrit <chrome-bot@google.com>2012-07-30 20:32:16 -0700
commitb13cf5de98496f8aa3cc8af0799848b8ca3b9439 (patch)
tree8e58cfdd83f7bbf69fb23fdccea550a5c1869422 /common/uart_buffering.c
parent2da2e72dd31c592fd3946b03eb927e8616a62808 (diff)
downloadchrome-ec-b13cf5de98496f8aa3cc8af0799848b8ca3b9439.tar.gz
Fix a bug that a line longer than 80 char kills EC console
BUG=chrome-os-partner:11938 TEST=Type a command longer than 80 char and press enter. Check console is still alive. Change-Id: Ib86c5f97cc12220ac62ab8855ef8e5c65ecd2d82 Reviewed-on: https://gerrit.chromium.org/gerrit/28679 Reviewed-by: Charlie Mooney <charliemooney@chromium.org> Tested-by: Charlie Mooney <charliemooney@chromium.org> Reviewed-by: Randall Spangler <rspangler@chromium.org> Commit-Ready: Vic Yang <victoryang@chromium.org> Tested-by: Vic Yang <victoryang@chromium.org>
Diffstat (limited to 'common/uart_buffering.c')
-rw-r--r--common/uart_buffering.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/common/uart_buffering.c b/common/uart_buffering.c
index 5220cb0119..4e7accec66 100644
--- a/common/uart_buffering.c
+++ b/common/uart_buffering.c
@@ -229,7 +229,7 @@ static void insert_char(char c)
int ptr;
/* On overflow, discard input */
- if (rx_cur_buf_head == RX_LINE_SIZE)
+ if (rx_cur_buf_head == RX_LINE_SIZE && c != '\n')
return;
/* Move buffer ptr to the end if 'c' is new line */