diff options
Diffstat (limited to 'src/common/proto-irc.c')
-rw-r--r-- | src/common/proto-irc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/common/proto-irc.c b/src/common/proto-irc.c index 69501ee3..fa2d822b 100644 --- a/src/common/proto-irc.c +++ b/src/common/proto-irc.c @@ -454,7 +454,8 @@ channel_date (session *sess, char *chan, char *timestr, { time_t timestamp = (time_t) atol (timestr); char *tim = ctime (×tamp); - tim[24] = 0; /* get rid of the \n */ + if (tim != NULL) + tim[24] = 0; /* get rid of the \n */ EMIT_SIGNAL_TIMESTAMP (XP_TE_CHANDATE, sess, chan, tim, NULL, NULL, 0, tags_data->timestamp); } @@ -602,7 +603,8 @@ process_numeric (session * sess, int n, else { tim = ctime (×tamp); - tim[19] = 0; /* get rid of the \n */ + if (tim != NULL) + tim[19] = 0; /* get rid of the \n */ EMIT_SIGNAL_TIMESTAMP (XP_TE_WHOIS4T, whois_sess, word[4], outbuf, tim, NULL, 0, tags_data->timestamp); } |