diff options
-rw-r--r-- | src/char_sql/char.c | 4 | ||||
-rw-r--r-- | src/char_sql/int_quest.c | 3 |
2 files changed, 4 insertions, 3 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c index d4cde63e6..87f558066 100644 --- a/src/char_sql/char.c +++ b/src/char_sql/char.c @@ -426,7 +426,7 @@ static void* create_charstatus(DBKey key, va_list args) int mmo_char_tosql(int char_id, struct mmo_charstatus* p) { - int i = 0, j; + int i = 0; int count = 0; int diff = 0; char save_status[128]; //For displaying save information. [Skotlex] @@ -910,8 +910,6 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything struct item tmp_item; struct skill tmp_skill; struct s_friend tmp_friend; - struct quest tmp_quest; - struct quest_objective tmp_quest_obj; #ifdef HOTKEY_SAVING struct hotkey tmp_hotkey; int hotkey_num; diff --git a/src/char_sql/int_quest.c b/src/char_sql/int_quest.c index 3c3e5446d..86ebccdae 100644 --- a/src/char_sql/int_quest.c +++ b/src/char_sql/int_quest.c @@ -33,6 +33,9 @@ int mapif_quests_fromsql(int char_id, struct quest questlog[]) return 0; } + memset(&tmp_quest, 0, sizeof(struct quest)); + memset(&tmp_quest_objective, 0, sizeof(struct quest_objective)); + if( SQL_ERROR == SqlStmt_Prepare(stmt, "SELECT `quest_id`, `state` FROM `%s` WHERE `char_id`=? LIMIT %d", quest_db, MAX_QUEST) || SQL_ERROR == SqlStmt_BindParam(stmt, 0, SQLDT_INT, &char_id, 0) || SQL_ERROR == SqlStmt_Execute(stmt) |