From: fatbob313 Date: Sat, 30 Jan 2010 21:10:34 +0000 (+0000) Subject: playerName can be NULL. Check if it is before logging X-Git-Url: http://git.code-monkey.de/?a=commitdiff_plain;h=389754908fdc52e719e65cd1f98fa4f0dafbacd1;p=umurmur.git playerName can be NULL. Check if it is before logging --- 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");