From 16cbbae762ff2c52b073e618bd2a1a64521b560d Mon Sep 17 00:00:00 2001 From: piaip Date: Fri, 18 Apr 2008 21:50:04 +0000 Subject: - (internal) fix chicken and bid data padding error - user: fix conditional compile error git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4195 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- include/pttstruct.h | 5 ++++- mbbsd/user.c | 2 +- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/include/pttstruct.h b/include/pttstruct.h index 88c8e10b..bfb3453d 100644 --- a/include/pttstruct.h +++ b/include/pttstruct.h @@ -17,19 +17,22 @@ typedef struct bid_t { int usermax; /* 自動競標最高價 */ int increment; /* 出價增額 */ char userid[IDLEN + 1]; /* 最高出價者 */ + // 這裡有 padding? time4_t enddate; /* 結標日期 */ char payby; /* 付款方式 */ /* 1 cash 2 check or mail 4 wire 8 credit 16 postoffice */ char flag; /* 屬性 (是否已評價) */ char pad[2]; int shipping; /* 運費 */ -} PACKSTRUCT bid_t; +} bid_t; +// PACKSTRUCT bid_t; /* 小雞的資料 */ typedef struct chicken_t { /* 128 bytes */ char name[20]; uint8_t type; /* 物種 */ uint8_t tech[16]; /* 技能 (unused) */ + uint8_t pad0[3]; time4_t birthday; /* 生日 */ time4_t lastvisit; /* 上次照顧時間 */ int32_t oo; /* 補品 */ diff --git a/mbbsd/user.c b/mbbsd/user.c index 18f5576d..8d8474f7 100644 --- a/mbbsd/user.c +++ b/mbbsd/user.c @@ -133,7 +133,7 @@ user_display(const userec_t * u, int adminmode) (u->uflag2 & LIVERIGHT) ? "永久居留)" : "未取得居留權)" : ""); #elif defined(FOREIGN_REG) - prints(" %s" u->uflag2 & FOREIGN ? "(外籍)" : ""); + prints(" %s", u->uflag2 & FOREIGN ? "(外籍)" : ""); #endif outs("\n"); // end of realname prints("\t\t職業學歷: %s\n", u->career); -- cgit v1.2.3