diff cons.c @ 64:11c453539d31

Fix off by one bug when terminating input command.
author darius@Inchoate
date Sun, 18 Jan 2009 18:04:01 +1030
parents 5898fba6593c
children
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;