summaryrefslogtreecommitdiffstats
path: root/mbbsd/cal.c
diff options
context:
space:
mode:
authorlwms <lwms@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-05-02 14:30:22 +0800
committerlwms <lwms@63ad8ddf-47c3-0310-b6dd-a9e9d9715204>2002-05-02 14:30:22 +0800
commit2a15c1580f415b045fe126ccad26b09b4945d090 (patch)
tree5e155237bd0653b6bec11247a102330195bb0652 /mbbsd/cal.c
parent7868546d63593fbf7f0d8bc02623ba5c6c67f381 (diff)
downloadpttbbs-2a15c1580f415b045fe126ccad26b09b4945d090.tar
pttbbs-2a15c1580f415b045fe126ccad26b09b4945d090.tar.gz
pttbbs-2a15c1580f415b045fe126ccad26b09b4945d090.tar.bz2
pttbbs-2a15c1580f415b045fe126ccad26b09b4945d090.tar.lz
pttbbs-2a15c1580f415b045fe126ccad26b09b4945d090.tar.xz
pttbbs-2a15c1580f415b045fe126ccad26b09b4945d090.tar.zst
pttbbs-2a15c1580f415b045fe126ccad26b09b4945d090.zip
*** empty log message ***
git-svn-id: http://opensvn.csie.org/pttbbs/pttbbs/trunk/pttbbs@141 63ad8ddf-47c3-0310-b6dd-a9e9d9715204
Diffstat (limited to 'mbbsd/cal.c')
-rw-r--r--mbbsd/cal.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/mbbsd/cal.c b/mbbsd/cal.c
index 139492e9..6319ca50 100644
--- a/mbbsd/cal.c
+++ b/mbbsd/cal.c
@@ -1,4 +1,4 @@
-/* $Id: cal.c,v 1.4 2002/05/02 06:27:40 lwms Exp $ */
+/* $Id: cal.c,v 1.5 2002/05/02 06:30:22 lwms Exp $ */
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
@@ -373,7 +373,7 @@ int give_tax(int money)
for( tax_rate = 0; tax_rate <= 3; tax_rate++ )
if ( money >= tax_bound[tax_rate] ) break;
tax = money * ( 0.5 - tax_rate/10.0 );
- return tax;
+ return tax <= 0 ? 1 : tax;
}
int p_give() {