From 35a01c11296e1802e5f83467a9a11ce90290b89d Mon Sep 17 00:00:00 2001 From: in2 Date: Wed, 5 May 2004 12:17:00 +0000 Subject: fix empty muser.justify git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1925 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/admin.c | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'mbbsd/admin.c') diff --git a/mbbsd/admin.c b/mbbsd/admin.c index c2a429f5..c5d94ca6 100644 --- a/mbbsd/admin.c +++ b/mbbsd/admin.c @@ -1069,12 +1069,14 @@ scan_register_form(char *regfile, int automode, int neednum) strlcpy(muser.realname, fdata[2], sizeof(muser.realname)); strlcpy(muser.address, fdata[4], sizeof(muser.address)); strlcpy(muser.email, fdata[6], sizeof(muser.email)); - strncpy(muser.justify, genbuf, REGLEN); - sethomefile(buf, muser.userid, "justify"); - log_file(buf, LOG_CREAT | LOG_VF, - "%s:%s:%s\n", fdata[5], fdata[3], uid); + snprintf(genbuf, sizeof(genbuf), "%s:%s:%s", + fdata[5], fdata[3], uid); + strlcpy(muser.justify, genbuf, sizeof(muser.justify)); passwd_update(unum, &muser); + sethomefile(buf, muser.userid, "justify"); + log_file(buf, LOG_CREAT, genbuf); + if ((fout = fopen(logfile, "a"))) { for (n = 0; field[n]; n++) fprintf(fout, "%s: %s\n", field[n], fdata[n]); -- cgit v1.2.3