diff packages/io/serial/current/src/common/tty.c @ 62:7a6ac9edc838 ecos-sw-2000-01-24

Merge from eCos master repository on 2000-01-24-19:43:49-GMT
author jlarmour
date Mon, 24 Jan 2000 21:43:17 +0000
parents 443894e2e912
children c38311975d4f
line wrap: on
line diff
--- a/packages/io/serial/current/src/common/tty.c
+++ b/packages/io/serial/current/src/common/tty.c
@@ -208,8 +208,9 @@ tty_read(cyg_io_handle_t handle, void *_
         if ((priv->dev_info.tty_in_flags & CYG_TTY_IN_FLAGS_BINARY) == 0) {
             if ((c == '\b') || (c == 0x7F)) {
                 size -= 2;  // erase one character + 'backspace' char
-                if (size < 0) size = 0;
-                if (priv->dev_info.tty_in_flags & CYG_TTY_IN_FLAGS_ECHO) {
+                if (size < 0) {
+                    size = 0;
+                } else if (priv->dev_info.tty_in_flags & CYG_TTY_IN_FLAGS_ECHO) {
                     clen = 3;
                     cyg_io_write(chan, "\b \b", &clen);
                 }