diff --git a/src/physfs_platform_unix.c b/src/physfs_platform_unix.c index 10d93a7..06ed580 100644 --- a/src/physfs_platform_unix.c +++ b/src/physfs_platform_unix.c @@ -248,6 +248,11 @@ static char *readSymLink(const char *path) char *__PHYSFS_platformCalcBaseDir(const char *argv0) { +#ifdef __EMSCRIPTEN__ + char *root = (char *) allocator.Malloc(2); + if (root) strcpy(root, "/"); + return root; +#endif char *retval = NULL; const char *envr = NULL;