diff --git a/src/main.c b/src/main.c index bbf33a3..9505782 100644 --- a/src/main.c +++ b/src/main.c @@ -55,12 +55,10 @@ negotiate(unsigned char* buf) return 1; } - for (uint_fast8_t i = 0; i < 3; ++i) { - if (buf[i] == DO) - buf[i] = WONT; - else if (buf[i] == WILL) - buf[i] = DO; - } + if (buf[1] == DO) + buf[1] = WONT; + else if (buf[1] == WILL) + buf[1] = DO; if (send(sock, buf, 3, 0) != 3) { perror("ERROR: send");