# HG changeset patch # User darius@Inchoate # Date 1232264041 -37800 # Node ID 11c453539d314ff0335ba5c89712ba99a17ebfb6 # Parent 4d914a1fd4870f3676514fd198beb833accae16d Fix off by one bug when terminating input command. diff -r 4d914a1fd487 -r 11c453539d31 cons.c --- 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;