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.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/src/map/trade.c b/src/map/trade.c
index 46acb4e16..379756394 100644
--- a/src/map/trade.c
+++ b/src/map/trade.c
@@ -239,7 +239,6 @@ int trade_check(struct map_session_data *sd, struct map_session_data *tsd)
struct item inventory2[MAX_INVENTORY];
struct item_data *data;
int trade_i, i, n;
- short amount;
// check zenys value against hackers (Zeny was already checked on time of adding, but you never know when you lost some zeny since then.
if(sd->deal.zeny > sd->status.zeny || (tsd->status.zeny > MAX_ZENY - sd->deal.zeny))
@@ -252,8 +251,8 @@ int trade_check(struct map_session_data *sd, struct map_session_data *tsd)
memcpy(&inventory2, &tsd->status.inventory, sizeof(struct item) * MAX_INVENTORY);
// check free slot in both inventory
- for(trade_i = 0; trade_i < 10; trade_i++) {
- amount = sd->deal.item[trade_i].amount;
+ for (trade_i = 0; trade_i < 10; trade_i++) {
+ short amount = sd->deal.item[trade_i].amount;
if (amount) {
n = sd->deal.item[trade_i].index;
if (amount > inventory[n].amount)