summaryrefslogtreecommitdiffstats
path: root/honeypot.c
diff options
context:
space:
mode:
Diffstat (limited to 'honeypot.c')
-rw-r--r--honeypot.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/honeypot.c b/honeypot.c
index 182833c..be8f77f 100644
--- a/honeypot.c
+++ b/honeypot.c
@@ -176,11 +176,12 @@ void readline(char *buffer, size_t size, int password)
i -= 2;
continue;
}
- } else if (iscntrl(c)) {
- --i;
- continue;
} else if (c == 0xff)
_exit(EXIT_SUCCESS);
+ else if (iscntrl(c)) {
+ --i;
+ continue;
+ }
buffer[i] = c;
putc(password ? '*' : c, output);
fflush(output);