summaryrefslogtreecommitdiff
path: root/monitor.c
diff options
context:
space:
mode:
authorbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-07-14 20:26:42 +0000
committerbellard <bellard@c046a42c-6fe2-441c-8c8c-71466251a162>2006-07-14 20:26:42 +0000
commit7ba1260ac1637f5d9e3af619e74de3cb39f10ba6 (patch)
tree8c681bb28d19203b78580f201e09d66227feb6a6 /monitor.c
parentbd468840d4db56198a3d7ce4692711ddc2217771 (diff)
downloadqemu-7ba1260ac1637f5d9e3af619e74de3cb39f10ba6.zip
generate CRLF instead of LF
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2055 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'monitor.c')
-rw-r--r--monitor.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/monitor.c b/monitor.c
index 9a18639c4b..5edd39e922 100644
--- a/monitor.c
+++ b/monitor.c
@@ -82,8 +82,10 @@ void term_puts(const char *str)
c = *str++;
if (c == '\0')
break;
+ if (c == '\n')
+ term_outbuf[term_outbuf_index++] = '\r';
term_outbuf[term_outbuf_index++] = c;
- if (term_outbuf_index >= sizeof(term_outbuf) ||
+ if (term_outbuf_index >= (sizeof(term_outbuf) - 1) ||
c == '\n')
term_flush();
}