Sfoglia il codice sorgente

Reports correctly when opening files for read without a search path defined.

Ryan C. Gordon 24 anni fa
parent
commit
1db7c3b70f
1 ha cambiato i file con 1 aggiunte e 0 eliminazioni
  1. 1 0
      physfs.c

+ 1 - 0
physfs.c

@@ -1321,6 +1321,7 @@ PHYSFS_file *PHYSFS_openRead(const char *fname)
         fname++;
         fname++;
 
 
     __PHYSFS_platformGrabMutex(stateLock);
     __PHYSFS_platformGrabMutex(stateLock);
+    BAIL_IF_MACRO_MUTEX(!searchPath, ERR_NOT_IN_SEARCH_PATH, stateLock, NULL);
     for (i = searchPath; i != NULL; i = i->next)
     for (i = searchPath; i != NULL; i = i->next)
     {
     {
         DirHandle *h = i->dirHandle;
         DirHandle *h = i->dirHandle;