From db0578da3212c0aeac388ac5f4a504462e1c82ac Mon Sep 17 00:00:00 2001 From: piaip Date: Sat, 23 Feb 2008 17:23:48 +0000 Subject: - asses: gpfix: align MAXGP to real value. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3944 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/assess.c | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'mbbsd/assess.c') diff --git a/mbbsd/assess.c b/mbbsd/assess.c index 231ca71b..e3c68bf1 100644 --- a/mbbsd/assess.c +++ b/mbbsd/assess.c @@ -60,12 +60,14 @@ void set_assess(const char *userid, unsigned char num, int type) #define AIDC_LEN (20) #endif // AIDC_LEN -#define MAXGP (100) +// #define MAXGP (100) +#define MAXGP (SALE_MAXVALUE) int u_fixgoodpost(void) { - char endinput = 0, newgp = 0; + char endinput = 0; + unsigned int newgp = 0; int bid; char bname[IDLEN+1]; char xaidc[AIDC_LEN+1]; @@ -244,12 +246,12 @@ u_fixgoodpost(void) } vmsgf("%s 看板輸入完成。", bname); } + if (newgp > MAXGP) + newgp = MAXGP; if (newgp <= cuser.goodpost) { - vmsg("確認優文數目低於已有優文數,不調整。"); + vmsg("確認優文數目未高於已有優文數,不調整。"); } else { - if (newgp > MAXGP) - newgp = MAXGP; log_filef("log/fixgoodpost.log", LOG_CREAT, "%s %s 自動修正優文數: 由 %d 變為 %d\n", Cdate(&now), cuser.userid, cuser.goodpost, newgp); -- cgit v1.2.3