Another two bugs.

Lines 70-73:
if(!c || !isspace(msg[1]))
        sout("%s", msg);
else {
        if(msg[1])

If line 73 is executed, isspace(msg[1]) is true.  So it can't be equal
to '\0'.  Therefore, condition `msg[1]` is always true.

* * *

When you type

:a<tab>bcd

line 97

    sout("%c %s", c, msg);

will send "a bcd" (tab replaced by space) to server.



Reply via email to