summaryrefslogtreecommitdiff
path: root/src/map/pc.c
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2014-03-11 16:32:50 -0300
committershennetsind <ind@henn.et>2014-03-11 16:32:50 -0300
commit44819f75ab08b78ed7d09d3bbae0dc78a63aca52 (patch)
treedb0b53515052735286a5c5487c96f9ebdeb82c0a /src/map/pc.c
parent568d45bb453cb9e9d9bf8e84e5b11ed6e5873a9e (diff)
downloadhercules-44819f75ab08b78ed7d09d3bbae0dc78a63aca52.tar.gz
hercules-44819f75ab08b78ed7d09d3bbae0dc78a63aca52.tar.bz2
hercules-44819f75ab08b78ed7d09d3bbae0dc78a63aca52.tar.xz
hercules-44819f75ab08b78ed7d09d3bbae0dc78a63aca52.zip
Fixed Bug 8072
Special Thanks to kyeme, Haruna http://hercules.ws/board/tracker/issue-8072-map-crash-autotrade/ Signed-off-by: shennetsind <ind@henn.et>
Diffstat (limited to 'src/map/pc.c')
-rw-r--r--src/map/pc.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/map/pc.c b/src/map/pc.c
index 87f14bcd9..5eb682415 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -10477,6 +10477,12 @@ void pc_autotrade_prepare(struct map_session_data *sd) {
sex = sd->status.sex;
safestrncpy(title, sd->message, sizeof(title));
+ sd->npc_id = 0;
+ sd->npc_shopid = 0;
+ if (sd->st) {
+ sd->st->state = END;
+ sd->st = NULL;
+ }
map->quit(sd);
chrif->auth_delete(account_id, char_id, ST_LOGOUT);