Explorar o código

Allow a mount point of NULL to mean "/".

Ryan C. Gordon %!s(int64=21) %!d(string=hai) anos
pai
achega
779e526014
Modificáronse 1 ficheiros con 3 adicións e 1 borrados
  1. 3 1
      physfs.c

+ 3 - 1
physfs.c

@@ -987,7 +987,9 @@ int PHYSFS_mount(const char *newDir, const char *mountPoint, int appendToPath)
     DirHandle *i;
 
     BAIL_IF_MACRO(newDir == NULL, ERR_INVALID_ARGUMENT, 0);
-    BAIL_IF_MACRO(mountPoint == NULL, ERR_INVALID_ARGUMENT, 0);
+
+    if (mountPoint == NULL)
+        mountPoint = "/";
 
     __PHYSFS_platformGrabMutex(stateLock);