From 5514fc1b12811a5dd903699cac2e6575dd855155 Mon Sep 17 00:00:00 2001 From: piaip Date: Wed, 13 Feb 2008 16:09:06 +0000 Subject: - searching user should bypass invalid records git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3913 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/admin.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'mbbsd') 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); -- cgit v1.2.3