diff options
-rw-r--r-- | Changelog-SVN.txt | 2 | ||||
-rw-r--r-- | src/common/core.c | 2 | ||||
-rw-r--r-- | src/map/map.c | 17 |
3 files changed, 12 insertions, 9 deletions
diff --git a/Changelog-SVN.txt b/Changelog-SVN.txt index f1241f134..3d7c75aba 100644 --- a/Changelog-SVN.txt +++ b/Changelog-SVN.txt @@ -1,6 +1,8 @@ Date Added 03/17 + * Fixed heap corrupion in map.c caused while loading maps + [SVN 1241: MouseJstr] * Re-fixed compile error in map.c -- sorry ^^; [celest] * trade.c fixed possibility of STORAGE+TRADE spooffing dupe [Lupus] Now, on accepting trade your active Storage window closes. (Either Common or Guils Storage) diff --git a/src/common/core.c b/src/common/core.c index 37a46825b..0b3d65fed 100644 --- a/src/common/core.c +++ b/src/common/core.c @@ -289,7 +289,9 @@ int main(int argc,char **argv) display_title(); +#ifndef BCHECK do_init_memmgr(argv[0]); // ��ԍŏ��Ɏ��s����K�v������ +#endif tick_ = time(0); ticks = gettick(); diff --git a/src/map/map.c b/src/map/map.c index 066427111..1ee3840c7 100644 --- a/src/map/map.c +++ b/src/map/map.c @@ -1729,15 +1729,14 @@ int map_mapname2mapid(char *name) { md = (struct map_data*)strdb_search(map_db,name); - #ifdef USE_AFM - // If we can't find the .gat map try .afm instead [celest] - if(md==NULL && strstr(name,".gat")) { - char afm_name[16] = ""; - strncpy(afm_name, name, strlen(name) - 4); - strcat(afm_name, ".afm"); - md = (struct map_data*)strdb_search(map_db,afm_name); - } - #endif +#ifdef USE_AFM + // If we can't find the .gat map try .afm instead [celest] + if(md==NULL && strstr(name,".gat")) { + char *afm_name = strdup(name); + strcpy(&afm_name[strlen(name) - 3], "afm"); + md = (struct map_data*)strdb_search(map_db,afm_name); + } +#endif if(md==NULL || md->gat==NULL) return -1; |