[mw-devel] MW3 r922 - branches/jscript/src
arthur at sucs.org
arthur at sucs.org
Wed Mar 21 08:46:42 GMT 2007
Author: arthur
Date: 2007-03-21 08:46:41 +0000 (Wed, 21 Mar 2007)
New Revision: 922
Modified:
branches/jscript/src/init.c
Log:
make recursive script loads be relative, fixes #18
Modified: branches/jscript/src/init.c
===================================================================
--- branches/jscript/src/init.c 2007-03-20 20:39:51 UTC (rev 921)
+++ branches/jscript/src/init.c 2007-03-21 08:46:41 UTC (rev 922)
@@ -216,7 +216,14 @@
free(header);
continue;
}
- ReadInitFile(base, b);
+ if ((c=strrchr(filename,'/'))!=NULL) {
+ char rpath[1024];
+ *c=0;
+ snprintf(rpath,sizeof(rpath),"%s/%s", filename, b);
+ *c='/';
+ ReadInitFile(base, rpath);
+ }else
+ ReadInitFile(base, b);
}else
/* check for destroying functions */
if (!strcasecmp(a, "destroy"))
More information about the mw-devel
mailing list