summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/char/int_mail.c2
-rw-r--r--src/common/HPM.c5
-rw-r--r--src/map/unit.c3
3 files changed, 6 insertions, 4 deletions
diff --git a/src/char/int_mail.c b/src/char/int_mail.c
index 79d20cbd1..17fb9d424 100644
--- a/src/char/int_mail.c
+++ b/src/char/int_mail.c
@@ -51,8 +51,8 @@ static int inter_mail_fromsql(int char_id, struct mail_data* md)
for (i = 0; i < MAIL_MAX_INBOX && SQL_SUCCESS == SQL->NextRow(inter->sql_handle); ++i )
{
- msg = &md->msg[i];
struct item *item;
+ msg = &md->msg[i];
SQL->GetData(inter->sql_handle, 0, &data, NULL); msg->id = atoi(data);
SQL->GetData(inter->sql_handle, 1, &data, NULL); safestrncpy(msg->send_name, data, NAME_LENGTH);
SQL->GetData(inter->sql_handle, 2, &data, NULL); msg->send_id = atoi(data);
diff --git a/src/common/HPM.c b/src/common/HPM.c
index 25ca5441d..6e73d1b2a 100644
--- a/src/common/HPM.c
+++ b/src/common/HPM.c
@@ -882,8 +882,9 @@ void hpm_final(void) {
aFree(HPM->confs[i]);
}
if (HPM->cmdline_plugins) {
- for (i = 0; i < HPM->cmdline_plugins_count; i++)
- aFree(HPM->cmdline_plugins[i]);
+ int j;
+ for (j = 0; j < HPM->cmdline_plugins_count; j++)
+ aFree(HPM->cmdline_plugins[j]);
aFree(HPM->cmdline_plugins);
HPM->cmdline_plugins = NULL;
HPM->cmdline_plugins_count = 0;
diff --git a/src/map/unit.c b/src/map/unit.c
index a1c739af3..27b96c55b 100644
--- a/src/map/unit.c
+++ b/src/map/unit.c
@@ -116,8 +116,9 @@ int unit_walktoxy_sub(struct block_list *bl)
//Trim the last part of the path to account for range,
//but always move at least one cell when requested to move.
for (i = (ud->chaserange*10)-10; i > 0 && ud->walkpath.path_len>1;) {
+ uint8 dir;
ud->walkpath.path_len--;
- uint8 dir = ud->walkpath.path[ud->walkpath.path_len];
+ dir = ud->walkpath.path[ud->walkpath.path_len];
if (dir&1)
i -= MOVE_COST*20; //When chasing, units will target a diamond-shaped area in range [Playtester]
else