diff options
author | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-05-13 03:27:11 +0800 |
---|---|---|
committer | scw <scw@63ad8ddf-47c3-0310-b6dd-a9e9d9715204> | 2007-05-13 03:27:11 +0800 |
commit | a6791f8eabb314185765cf54975aad5d791f13dd (patch) | |
tree | e38f9ab995da115f037637648739bc482f281270 /mbbsd | |
parent | 315fa725126ad2046d562a0948413c7fbc88626c (diff) | |
download | pttbbs-a6791f8eabb314185765cf54975aad5d791f13dd.tar pttbbs-a6791f8eabb314185765cf54975aad5d791f13dd.tar.gz pttbbs-a6791f8eabb314185765cf54975aad5d791f13dd.tar.bz2 pttbbs-a6791f8eabb314185765cf54975aad5d791f13dd.tar.lz pttbbs-a6791f8eabb314185765cf54975aad5d791f13dd.tar.xz pttbbs-a6791f8eabb314185765cf54975aad5d791f13dd.tar.zst pttbbs-a6791f8eabb314185765cf54975aad5d791f13dd.zip |
No white space padding when prvious string already too long
(due to the bug in dietlibc cvs version)
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@3514 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r-- | mbbsd/chicken.c | 2 | ||||
-rw-r--r-- | mbbsd/talk.c | 1 |
2 files changed, 2 insertions, 1 deletions
diff --git a/mbbsd/chicken.c b/mbbsd/chicken.c index 0a8b7db9..e7527e7b 100644 --- a/mbbsd/chicken.c +++ b/mbbsd/chicken.c @@ -174,7 +174,7 @@ show_chicken_stat(const chicken_t * thechicken, int age) ANSI_COLOR(33) "%-7d" ANSI_RESET " ¤j¸É¤Y:" ANSI_COLOR(33) "%-7d" ANSI_RESET " ÃÄ«~ :" ANSI_COLOR(33) "%-7d" ANSI_RESET " \n", thechicken->name, chicken_type[(int)thechicken->type], - (int)(15 - strlen(thechicken->name)), "", + strlen(thechicken->name) >= 15 ? 0 : (int)(15 - strlen(thechicken->name)), "", ptime->tm_year % 100, ptime->tm_mon + 1, ptime->tm_mday, cage[age > 16 ? 16 : age], age, thechicken->hp, thechicken->hp_max, thechicken->mm, thechicken->mm_max, diff --git a/mbbsd/talk.c b/mbbsd/talk.c index 62ad4670..b2307476 100644 --- a/mbbsd/talk.c +++ b/mbbsd/talk.c @@ -476,6 +476,7 @@ my_query(const char *uident) prints("¡m¢×¢Ò¼ÊºÙ¡n%s(%s)%*s¡m¸gÀÙª¬ªp¡n%s", muser.userid, muser.nickname, + strlen(muser.userid) + strlen(muser.nickname) >= 26 ? 0 : (int)(26 - strlen(muser.userid) - strlen(muser.nickname)), "", money_level(muser.money)); if (uentp && ((fri_stat & HFM && !uentp->invisible) || strcmp(muser.userid,cuser.userid) == 0)) |