diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/atcommand.c | 2 | ||||
-rw-r--r-- | src/map/skill.c | 5 |
2 files changed, 3 insertions, 4 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 2ce3009eb..916bf2387 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -5433,7 +5433,7 @@ int atcommand_mapinfo(const int fd, struct map_session_data* sd, const char* com if (atcmd_player_name[0] == '\0') { memcpy(atcmd_player_name, mapindex_id2name(sd->mapindex), MAP_NAME_LENGTH_EXT); - atcmd_player_name[MAP_NAME_LENGTH_EXT] = '\0'; + atcmd_player_name[MAP_NAME_LENGTH_EXT-1] = '\0'; m_id = map_mapindex2mapid(sd->mapindex); } else { m_id = map_mapname2mapid(atcmd_player_name); diff --git a/src/map/skill.c b/src/map/skill.c index b44219db1..0bd3f288e 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -6095,8 +6095,7 @@ int skill_castend_pos2 (struct block_list *src, int x, int y, int skillid, int s if (skilllv>3 && sd->status.memo_point[2].map) snprintf(memo[3], MAP_NAME_LENGTH_EXT, "%s.gat", mapindex_id2name(sd->status.memo_point[2].map)); - clif_skill_warppoint(sd,skillid,skilllv, - memo[0],memo[1],memo[2],memo[3]); + clif_skill_warppoint(sd,skillid,skilllv, memo[0],memo[1],memo[2],memo[3]); } break; @@ -6314,7 +6313,7 @@ int skill_castend_map (struct map_session_data *sd, int skill_num, const char *m if( skill_num != sd->menuskill_id) return 0; - if (strlen(map) > MAP_NAME_LENGTH-1) + if (strlen(map) > MAP_NAME_LENGTH_EXT-1) { //Map_length check, as it is sent by the client and we shouldn't trust it [Skotlex] if (battle_config.error_log) ShowError("skill_castend_map: Received map name '%s' too long!\n", map); |