]> git.mxchange.org Git - quix0rs-blobwars.git/blobdiff - src/main.cpp
Only try to chdir(PAKLOCATION) if it's actually set.
[quix0rs-blobwars.git] / src / main.cpp
index 9282a1e23a764f703ef04405f927274f077d0031..dbab69d0328fd6959e1788950ccdb2b933b9dd37 100644 (file)
@@ -124,12 +124,14 @@ int main(int argc, char *argv[])
        #endif
 
        #if RELEASE
-       if (chdir(PAKLOCATION))
+       #ifdef PAKLOCATION
+       if (PAKLOCATION[0] && chdir(PAKLOCATION))
        {
-               perror("Could not chdir to " PAKLOCATION ":");
+               perror("Could not chdir to '" PAKLOCATION "'");
                return 1;
        }
        #endif
+       #endif
        
        config.engine = &engine;