aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--kirc.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/kirc.c b/kirc.c
index 7fe67f3..b8772ae 100644
--- a/kirc.c
+++ b/kirc.c
@@ -510,12 +510,12 @@ static void rawParser(char *string) {
printf("%*s<<< \x1b[34;1m%s\x1b[0m", g - 3, "", nickname);
} else if (!strncmp(command, "PART", 4)) {
printf("%*s<-- \x1b[34;1m%s\x1b[0m", g - 3, "", nickname);
- if (strstr(channel, chan_default) == NULL) {
+ if (channel != NULL && strstr(channel, chan_default) == NULL) {
printf(" [\x1b[33m%s\x1b[0m] ", channel);
}
} else if (!strncmp(command, "JOIN", 4)) {
printf("%*s--> \x1b[32;1m%s\x1b[0m", g - 3, "", nickname);
- if (strstr(channel, chan_default) == NULL) {
+ if (channel != NULL && strstr(channel, chan_default) == NULL) {
printf(" [\x1b[33m%s\x1b[0m] ", channel);
}
} else if (!strncmp(command, "NICK", 4)) {