From 3bd8bcc145b015ba1d089d7cf39017ea391ca842 Mon Sep 17 00:00:00 2001 From: ptt Date: Wed, 3 Nov 2004 15:46:16 +0000 Subject: fix the bug. buy -1 mail = buy 100 mail git-svn-id: http://opensvn.csie.org/pttbbs/trunk/pttbbs@2308 63ad8ddf-47c3-0310-b6dd-a9e9d9715204 --- mbbsd/cal.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/mbbsd/cal.c b/mbbsd/cal.c index 7096c7fa..49e61a4e 100644 --- a/mbbsd/cal.c +++ b/mbbsd/cal.c @@ -299,10 +299,8 @@ p_exmail() getdata_str(b_lines - 2, 0, buf, ans, sizeof(ans), LCECHO, "10"); n = atoi(ans); - if (!ans[0] || !n) + if (!ans[0] || n<0) return 0; - if (n < 0) - n = 100; if (n + cuser.exmailbox > MAX_EXKEEPMAIL) n = MAX_EXKEEPMAIL - cuser.exmailbox; reload_money(); -- cgit v1.2.3