From 9c72ae398bb94e2279516f32c0aa9d1fc9e41a15 Mon Sep 17 00:00:00 2001 From: amber Date: Wed, 23 Mar 2005 21:59:20 +0000 Subject: another fix git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1280 54d463be-8e91-2dee-dedb-b68131a5f0ec --- Changelog-SVN.txt | 1 + src/map/trade.c | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Changelog-SVN.txt b/Changelog-SVN.txt index 10ab1f650..dcb72a6cf 100644 --- a/Changelog-SVN.txt +++ b/Changelog-SVN.txt @@ -1,6 +1,7 @@ Date Added 03/23 + * Adjusted my trade fix [1280: MouseJstr] * Fixed possible memory corruption in storage if number of guilds in database exceeds the max server can support [1278 : MouseJstr] * Fixed @mapexit to properly flush the fifo's before shutting 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; -- cgit v1.2.3-70-g09d2