diff options
Diffstat (limited to 'mbbsd/mbbsd.c')
-rw-r--r-- | mbbsd/mbbsd.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/mbbsd/mbbsd.c b/mbbsd/mbbsd.c index b350637b..d51f506e 100644 --- a/mbbsd/mbbsd.c +++ b/mbbsd/mbbsd.c @@ -1120,8 +1120,10 @@ user_login(void) mysrand(); /* check if over18 */ - // 照實歲計算 - if( (ptime.tm_year - cuser.year) > 18) + // 照實歲計算,沒生日的當作未滿 18 + if (cuser.year < 1 || cuser.month < 1) + over18 = 0; + else if( (ptime.tm_year - cuser.year) > 18) over18 = 1; else if (ptime.tm_year - cuser.year < 18) over18 = 0; |