[CF-Devel] CVS update: crossfire/server
Crossfire CVS devel
mwedel at scruznet.com
Thu Oct 5 13:42:43 CDT 2000
Date: Thursday October 5, 2000 @ 11:42
Author: peterm
Update of /home/cvs/CVS/crossfire/server
In directory boltzmann.eecs.berkeley.edu:/tmp/cvs-serv5870
Modified Files:
shop.c
Log Message:
Fix for crashing bug discovered by avogl.
Put in a check preventing a division by zero.
****************************************
Index: crossfire/server/shop.c
diff -u crossfire/server/shop.c:1.6 crossfire/server/shop.c:1.7
--- crossfire/server/shop.c:1.6 Sun Aug 6 22:16:34 2000
+++ crossfire/server/shop.c Thu Oct 5 11:42:42 2000
@@ -1,6 +1,6 @@
/*
* static char *rcsid_shop_c =
- * "$Id: shop.c,v 1.6 2000/08/07 05:16:34 cvs Exp $";
+ * "$Id: shop.c,v 1.7 2000/10/05 18:42:42 peterm Exp $";
*/
/*
@@ -138,7 +138,7 @@
/* Give money based on how many charges the item could have. Not
* really a good method - some spells are certainly better than others.
*/
- val=(val*tmp->stats.food)/spells[tmp->stats.sp].charges;
+ val=(val*tmp->stats.food)/MAX(1,spells[tmp->stats.sp].charges);
else
val/=3;
}
More information about the crossfire
mailing list