summaryrefslogtreecommitdiffstats
path: root/mbbsd/mbbsd.c
diff options
context:
space:
mode:
Diffstat (limited to 'mbbsd/mbbsd.c')
-rw-r--r--mbbsd/mbbsd.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c
index bea7c3b7..8d6219f4 100644
--- a/mbbsd/mbbsd.c
+++ b/mbbsd/mbbsd.c
@@ -115,14 +115,14 @@ log_usies(char *mode, char *mesg)
if (!mesg)
snprintf(genbuf, sizeof(genbuf),
- cuser->userid[0] ? "%s %s %-12s Stay:%d (%s)\n" :
+ cuser ? "%s %s %-12s Stay:%d (%s)\n" :
"%s %s %s Stay:%d (%s)\n",
- Cdate(&now), mode, cuser->userid,
- (int)(now - login_start_time) / 60, cuser->username);
+ Cdate(&now), mode, cuser ? cuser->userid :"",
+ (int)(now - login_start_time) / 60, cuser ? cuser->username:"");
else
snprintf(genbuf, sizeof(genbuf),
- cuser->userid[0] ? "%s %s %-12s %s\n" : "%s %s %s%s\n",
- Cdate(&now), mode, cuser->userid, mesg);
+ cuser ? "%s %s %-12s %s\n" : "%s %s %s%s\n",
+ Cdate(&now), mode, cuser ? cuser->userid :"", mesg);
log_file(FN_USIES, genbuf, 1);
/* °lÂÜ¨Ï¥ÎªÌ */