summaryrefslogtreecommitdiff
path: root/src/map/trade.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/map/trade.c')
-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;