diff options
-rw-r--r-- | client_network.c | 2 | ||||
-rw-r--r-- | tls.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/client_network.c b/client_network.c index fe03eba..37e3e8a 100644 --- a/client_network.c +++ b/client_network.c @@ -536,7 +536,7 @@ int initclientnetwork(void) { #if LOGALL ssize_t SENDCLIENT(struct string msg) { - if (!msg.len) + if (msg.len == 0) return 0; static char printprefix = 1; @@ -106,7 +106,7 @@ ssize_t SEND(struct string msg) { WRITES(1, msg); - if (msg.data[msg.len - 1] == '\n') { + if (msg.len == 0 || msg.data[msg.len - 1] == '\n') { printprefix = 1; #if COLORIZE WRITES(1, STRING("\x1b[0m\n")); |