robot

Dependencies:   FastPWM3 mbed

Revision:
214:c70a6e86417f
Parent:
212:1e370ffcb73d
Child:
246:167b5d50d0f2
--- a/callbacks.cpp	Sun Apr 29 04:50:25 2018 +0000
+++ b/callbacks.cpp	Sun Apr 29 05:02:14 2018 +0000
@@ -13,7 +13,7 @@
         char c = io.pc->getc();
         if (c != 127 && c != 8 && c != '\r' && c != '\t') {
             linebuf[index] = c;
-            index++;
+            if (index < 127) index++;
             io.pc->putc(c);
         } else if (c == 127 || c == 8) {
             if (index > 0) {