Mercurial > ~darius > hgwebdir.cgi > tempctrl
comparison 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 |
comparison
equal
deleted
inserted
replaced
63:4d914a1fd487 | 64:11c453539d31 |
---|---|
136 } | 136 } |
137 c = UDR; | 137 c = UDR; |
138 | 138 |
139 /* End of line? */ | 139 /* End of line? */ |
140 if (c == '\n' || c == '\r') { | 140 if (c == '\n' || c == '\r') { |
141 cmd.buf[cmd.state + 1] = '\0'; | 141 cmd.buf[cmd.state] = '\0'; |
142 cons_putsP(PSTR("\r\n")); | 142 cons_putsP(PSTR("\r\n")); |
143 cmd.len = cmd.state; | 143 cmd.len = cmd.state; |
144 cmd.state = 255; | 144 cmd.state = 255; |
145 continue; | 145 continue; |
146 } | 146 } |