summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDennis Friis <peavey@placid.dk>2008-10-23 14:26:48 +0000
committerDennis Friis <peavey@placid.dk>2008-10-23 14:26:48 +0000
commitcf635e4d6fc28800b056bc9d99a145db9ae2694a (patch)
tree8e8fe86b3f6371c40ed4a4634c97780e90d61781
parente93f77136d5921bc8a6ff424d915322b2f0a7d14 (diff)
downloadtmwa-cf635e4d6fc28800b056bc9d99a145db9ae2694a.tar.gz
tmwa-cf635e4d6fc28800b056bc9d99a145db9ae2694a.tar.bz2
tmwa-cf635e4d6fc28800b056bc9d99a145db9ae2694a.tar.xz
tmwa-cf635e4d6fc28800b056bc9d99a145db9ae2694a.zip
oops, fix condition logic since I borrowed this from code that checks used slots and not free ones.
-rw-r--r--src/map/trade.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/map/trade.c b/src/map/trade.c
index 01b6ced..5208292 100644
--- a/src/map/trade.c
+++ b/src/map/trade.c
@@ -108,7 +108,7 @@ void trade_tradeadditem(struct map_session_data *sd,int index,int amount)
// determine free slots of receiver
int i, free = 0;
for(i=0;i<MAX_INVENTORY;i++){
- if(target_sd->status.inventory[i].nameid==0 || target_sd->inventory_data[i] == NULL)
+ if(target_sd->status.inventory[i].nameid==0 && target_sd->inventory_data[i] == NULL)
free++;
}
free -= trade_i;