From 389754908fdc52e719e65cd1f98fa4f0dafbacd1 Mon Sep 17 00:00:00 2001 From: fatbob313 Date: Sat, 30 Jan 2010 21:10:34 +0000 Subject: [PATCH] playerName can be NULL. Check if it is before logging --- src/log.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/log.c b/src/log.c index 2739641..8990c03 100644 --- a/src/log.c +++ b/src/log.c @@ -115,7 +115,7 @@ void Log_info_client(client_t *client, const char *logstring, ...) va_end(argp); offset += snprintf(&buf[offset], STRSIZE - offset, " - [%d] %s@%s:%d", client->sessionId, - client->playerName, + client->playerName == NULL ? "" : client->playerName, inet_ntoa(client->remote_tcp.sin_addr), ntohs(client->remote_tcp.sin_port)); strcat(buf, "\n"); -- 2.30.2