changeset 64:11c453539d31

Fix off by one bug when terminating input command.
author darius@Inchoate
date Sun, 18 Jan 2009 18:04:01 +1030
parents 4d914a1fd487
children 1ef17cd8af7a
files cons.c
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/cons.c	Thu Oct 30 20:09:32 2008 +1030
+++ b/cons.c	Sun Jan 18 18:04:01 2009 +1030
@@ -138,7 +138,7 @@
 	
 	/* End of line? */
 	if (c == '\n' || c == '\r') {
-	    cmd.buf[cmd.state + 1] = '\0';
+	    cmd.buf[cmd.state] = '\0';
 	    cons_putsP(PSTR("\r\n"));
 	    cmd.len = cmd.state;
 	    cmd.state = 255;