From ae69e16adc2030017cd8b409737e522162589790 Mon Sep 17 00:00:00 2001 From: shennetsind Date: Mon, 24 Jun 2013 13:36:50 -0300 Subject: Fixed Bug #7419 Special Thanks to Axiom http://hercules.ws/board/tracker/issue-7419-pcc-error/ Signed-off-by: shennetsind --- src/map/pc.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'src/map') diff --git a/src/map/pc.c b/src/map/pc.c index 1a5822f81..0d1a99175 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -4704,7 +4704,7 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y nullpo_ret(sd); - if( !mapindex || !mapindex_id2name(mapindex) ) { + if( !mapindex || !mapindex_id2name(mapindex) || ( m = iMap->mapindex2mapid(mapindex) ) == -1 ) { ShowDebug("pc_setpos: Passed mapindex(%d) is invalid!\n", mapindex); return 1; } @@ -4713,7 +4713,6 @@ int pc_setpos(struct map_session_data* sd, unsigned short mapindex, int x, int y pc->setstand(sd); pc->setrestartvalue(sd,1); } - m = iMap->mapindex2mapid(mapindex); if( map[m].flag.src4instance ) { struct party_data *p; -- cgit v1.2.3-60-g2f50