summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-23 21:59:20 +0000
committeramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-23 21:59:20 +0000
commit9c72ae398bb94e2279516f32c0aa9d1fc9e41a15 (patch)
tree26a4abb556e2c5491158e1c514e63889050e7ebf /src
parent028a7517ec21e57b3da1bdb0631715f552800072 (diff)
downloadhercules-9c72ae398bb94e2279516f32c0aa9d1fc9e41a15.tar.gz
hercules-9c72ae398bb94e2279516f32c0aa9d1fc9e41a15.tar.bz2
hercules-9c72ae398bb94e2279516f32c0aa9d1fc9e41a15.tar.xz
hercules-9c72ae398bb94e2279516f32c0aa9d1fc9e41a15.zip
another fix
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1280 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src')
-rw-r--r--src/map/trade.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/map/trade.c b/src/map/trade.c
index 5219c27fa..d98eed2a0 100644
--- a/src/map/trade.c
+++ b/src/map/trade.c
@@ -220,8 +220,8 @@ void trade_tradeok(struct map_session_data *sd) {
// check items
for(trade_i = 0; trade_i < 10; trade_i++) {
- if (((sd->deal_item_index[trade_i]-2) < 0) ||
- (sd->deal_item_amount[trade_i] > sd->status.inventory[sd->deal_item_index[trade_i]-2].amount) ||
+ if ((((sd->deal_item_index[trade_i]-2) >= 0) &&
+ (sd->deal_item_amount[trade_i] > sd->status.inventory[sd->deal_item_index[trade_i]-2].amount)) ||
(sd->deal_item_amount[trade_i] < 0)) {
trade_tradecancel(sd);
return;