]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix for CreatePath creating a directory of the drive's letter in windows (d:\quake...
authorlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 20 Mar 2002 17:31:29 +0000 (17:31 +0000)
committerlordhavoc <lordhavoc@d7cf8633-e32d-0410-b094-e92efae38249>
Wed, 20 Mar 2002 17:31:29 +0000 (17:31 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@1663 d7cf8633-e32d-0410-b094-e92efae38249

common.c

index bc7cfea3efd076519b1b3cce5d49e4d0820da6cb..eda4f717bb90a30e0a6918c3797a0d545b9959fc 100644 (file)
--- a/common.c
+++ b/common.c
@@ -841,8 +841,8 @@ void COM_StripExtension (char *in, char *out)
        while (*in)
        {
                if (*in == '.')
-                       last = in;
-               if ((*in == '/') || (*in == '\\') || (*in == ':'))
+                       last = out;
+               else if (*in == '/' || *in == '\\' || *in == ':')
                        last = NULL;
                *out++ = *in++;
        }
@@ -1355,8 +1355,9 @@ void    COM_CreatePath (char *path)
 
        for (ofs = path+1 ; *ofs ; ofs++)
        {
-               if (*ofs == '/' || *ofs == '\\' || *ofs == ':')
-               {       // create the directory
+               if (*ofs == '/' || *ofs == '\\')
+               {
+                       // create the directory
                        save = *ofs;
                        *ofs = 0;
                        Sys_mkdir (path);