summaryrefslogtreecommitdiffstats
path: root/mbbsd/assess.c
diff options
context:
space:
mode:
authorscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-12-24 20:28:54 +0800
committerscw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2003-12-24 20:28:54 +0800
commit7234a7e820487eff9f2abf562ff7cacbc6bd31a2 (patch)
tree9e1548cd0c48a7f185cd41870f55466038c5109e /mbbsd/assess.c
parent36b8776e3788b80fa07f4e43288bc60ab1d69b13 (diff)
downloadpttbbs-7234a7e820487eff9f2abf562ff7cacbc6bd31a2.tar
pttbbs-7234a7e820487eff9f2abf562ff7cacbc6bd31a2.tar.gz
pttbbs-7234a7e820487eff9f2abf562ff7cacbc6bd31a2.tar.bz2
pttbbs-7234a7e820487eff9f2abf562ff7cacbc6bd31a2.tar.lz
pttbbs-7234a7e820487eff9f2abf562ff7cacbc6bd31a2.tar.xz
pttbbs-7234a7e820487eff9f2abf562ff7cacbc6bd31a2.tar.zst
pttbbs-7234a7e820487eff9f2abf562ff7cacbc6bd31a2.zip
Fix money bug when deleting anonymous post. (Found since some user found
that their money vanished when their article is deleted as badpost) Add some comment. git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@1429 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/assess.c')
-rw-r--r--mbbsd/assess.c11
1 files changed, 6 insertions, 5 deletions
diff --git a/mbbsd/assess.c b/mbbsd/assess.c
index a9bbe10f..2e8ebd36 100644
--- a/mbbsd/assess.c
+++ b/mbbsd/assess.c
@@ -16,19 +16,20 @@ inline static void inc(unsigned char *num, int n)
#define modify_column(name) \
int inc_##name(int uid, int num) \
{ \
+ userinfo_t *user; \
passwd_query(uid, &xuser); \
inc(&xuser.name, num); \
- userinfo_t *user = search_ulist(uid); \
+ user = search_ulist(uid); \
if (user != NULL) \
user->name = xuser.name; \
passwd_update(uid, &xuser); \
return xuser.name; \
}
-modify_column(goodpost);
-modify_column(badpost);
-modify_column(goodsale);
-modify_column(badsale);
+modify_column(goodpost); /* inc_goodpost */
+modify_column(badpost); /* inc_badpost */
+modify_column(goodsale); /* inc_goodsale */
+modify_column(badsale); /* inc_badsale */
void set_assess(int uid, unsigned char num, int type)