diff options
-rw-r--r-- | include/pttstruct.h | 13 | ||||
-rw-r--r-- | mbbsd/assess.c | 4 |
2 files changed, 11 insertions, 6 deletions
diff --git a/include/pttstruct.h b/include/pttstruct.h index 19c53727..fcdb77bb 100644 --- a/include/pttstruct.h +++ b/include/pttstruct.h @@ -343,10 +343,15 @@ typedef struct userinfo_t { unsigned short int chc_win; unsigned short int chc_lose; unsigned short int chc_tie; - unsigned short int goodpost; - unsigned short int badpost; - unsigned short int goodsale; - unsigned short int badsale; + + unsigned char goodpost; + char pad_1; + unsigned char badpost; + char pad_2; + unsigned char goodsale; + char pad_3; + unsigned char badsale; + char pad_4; char mailalert; char sex; diff --git a/mbbsd/assess.c b/mbbsd/assess.c index 35badc8c..af361a13 100644 --- a/mbbsd/assess.c +++ b/mbbsd/assess.c @@ -20,9 +20,9 @@ int inc_##_attr(char *userid, int num) \ int uid = getuser(userid);\ if( uid > 0 ){ \ userinfo_t *uinfo = search_ulist(uid); \ - inc(&uinfo->_attr, num); \ if (uinfo != NULL) \ - inc(&xuser._attr, num); \ + inc(&uinfo->_attr, num); \ + inc(&xuser._attr, num); \ passwd_update(uid, &xuser); \ return xuser._attr; }\ return 0;\ |