summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mbbsd/passwd.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/mbbsd/passwd.c b/mbbsd/passwd.c
index 836798d4..75a013fb 100644
--- a/mbbsd/passwd.c
+++ b/mbbsd/passwd.c
@@ -491,8 +491,9 @@ int pwcuLoginSave ()
prev_regdays = (u.lastlogin - baseref) / DAY_SECONDS;
// assert(regdays >= prev_regdays);
- if (u.numlogindays > prev_regdays)
- u.numlogindays = prev_regdays;
+ // plus one for initial day
+ if (u.numlogindays > prev_regdays+1)
+ u.numlogindays = prev_regdays+1;
// calculate numlogindays (only increase one per each key)
if (regdays > prev_regdays)