summaryrefslogtreecommitdiffstats
path: root/mbbsd
diff options
context:
space:
mode:
authorpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-30 09:56:24 +0800
committerpiaip <piaip@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2008-04-30 09:56:24 +0800
commit24bd774a0b26c4929bc7d8a792928888a3c04669 (patch)
treeb6c382dfe82231f0c58341137096d6f004d29354 /mbbsd
parentdbf8394870200501a124955250e936c829fbb637 (diff)
downloadpttbbs-24bd774a0b26c4929bc7d8a792928888a3c04669.tar
pttbbs-24bd774a0b26c4929bc7d8a792928888a3c04669.tar.gz
pttbbs-24bd774a0b26c4929bc7d8a792928888a3c04669.tar.bz2
pttbbs-24bd774a0b26c4929bc7d8a792928888a3c04669.tar.lz
pttbbs-24bd774a0b26c4929bc7d8a792928888a3c04669.tar.xz
pttbbs-24bd774a0b26c4929bc7d8a792928888a3c04669.tar.zst
pttbbs-24bd774a0b26c4929bc7d8a792928888a3c04669.zip
- fix chicken sudden death after sysop revive
git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@4260 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd')
-rw-r--r--mbbsd/chicken.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mbbsd/chicken.c b/mbbsd/chicken.c
index dc077043..50c49d48 100644
--- a/mbbsd/chicken.c
+++ b/mbbsd/chicken.c
@@ -893,8 +893,7 @@ chicken_toggle_death(const char *uid)
return;
#endif
- if (!uid)
- return;
+ assert(uid);
if (!mychicken)
{
vmsgf("%s 沒養寵物。", uid);
@@ -907,6 +906,7 @@ chicken_toggle_death(const char *uid)
else
{
strlcpy(mychicken->name, "[死]", sizeof(mychicken->name));
+ mychicken->lastvisit = now; // prevent suddent death
vmsgf("%s 的寵物復活了", uid);
}
free_live_chicken(mychicken);