summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog.txt1
-rw-r--r--src/map/map.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/Changelog.txt b/Changelog.txt
index ff7028db1..4aecde3cd 100644
--- a/Changelog.txt
+++ b/Changelog.txt
@@ -1,5 +1,6 @@
Date Added
12/16
+ * Added a fix for AFM loading, thanks to Pete [celest]
* Updated maximum levels for supernovice to 99 [celest]
* Updated supernovice jobexp table - should be same from 50 onwards [celest]
* Corrected maximum job level checking in @joblvup and @charjob [celest]
diff --git a/src/map/map.c b/src/map/map.c
index 31bb76370..4f16881b0 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -1670,10 +1670,13 @@ int map_readallmap(void) {
for(i=0;i<map_num;i++){
#ifdef USE_AFM
char afm_name[256] = "";
+ char *p;
strncpy(afm_name, map[i].name, strlen(map[i].name) - 4);
strcat(afm_name, ".afm");
sprintf(fn,"%s\\%s",afm_dir,afm_name);
+ for(p=&fn[0];*p!=0;p++) if (*p=='\\') *p = '/'; // * At the time of Unix
+
afm_file = fopen(fn, "r");
if (afm_file != NULL) {
map_readafm(i,fn);