summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-02-14 00:09:06 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-02-14 00:09:06 +0800
commit5514fc1b12811a5dd903699cac2e6575dd855155 (patch)
treeae23718f974496ad8c6b35b0a7d317033d8a5e65 /mbbsd
parent747104a997297c7531d5e2aa637125836e28d2c8 (diff)
downloadpttbbs-5514fc1b12811a5dd903699cac2e6575dd855155.tar
pttbbs-5514fc1b12811a5dd903699cac2e6575dd855155.tar.gz
pttbbs-5514fc1b12811a5dd903699cac2e6575dd855155.tar.bz2
pttbbs-5514fc1b12811a5dd903699cac2e6575dd855155.tar.lz
pttbbs-5514fc1b12811a5dd903699cac2e6575dd855155.tar.xz
pttbbs-5514fc1b12811a5dd903699cac2e6575dd855155.tar.zst
pttbbs-5514fc1b12811a5dd903699cac2e6575dd855155.zip
- searching user should bypass invalid records
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3913 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/admin.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/mbbsd/admin.c b/mbbsd/admin.c
index 61bf1dba..1e5b515c 100644
--- a/mbbsd/admin.c
+++ b/mbbsd/admin.c
@@ -108,6 +108,11 @@ search_key_user(const char *passwdfile, int mode)
return 0;
}
while ((fread(&user, sizeof(user), 1, fp1)) > 0 && coun < MAX_USERS) {
+
+ // skip empty records
+ if (!user.userid[0])
+ continue;
+
if (!(++coun & 15)) {
move(1, 0);
prints("²Ä [%d] µ§¸ê®Æ\n", coun);