summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-05-05 20:17:00 +0800
committerin2 <in2@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2004-05-05 20:17:00 +0800
commit35a01c11296e1802e5f83467a9a11ce90290b89d (patch)
treef14ef2e99e03756de75677fe548db25265cd39fc
parent3919b146ee0e5830511e8421a1cbe91d9ab86898 (diff)
downloadpttbbs-35a01c11296e1802e5f83467a9a11ce90290b89d.tar
pttbbs-35a01c11296e1802e5f83467a9a11ce90290b89d.tar.gz
pttbbs-35a01c11296e1802e5f83467a9a11ce90290b89d.tar.bz2
pttbbs-35a01c11296e1802e5f83467a9a11ce90290b89d.tar.lz
pttbbs-35a01c11296e1802e5f83467a9a11ce90290b89d.tar.xz
pttbbs-35a01c11296e1802e5f83467a9a11ce90290b89d.tar.zst
pttbbs-35a01c11296e1802e5f83467a9a11ce90290b89d.zip
fix empty muser.justify
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1925 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
-rw-r--r--mbbsd/admin.c10
1 files changed, 6 insertions, 4 deletions
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]);