]> git.xonotic.org Git - xonotic/darkplaces.git/commitdiff
fix some compile errors. Now it should work.
authordivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 9 Jan 2010 18:46:49 +0000 (18:46 +0000)
committerdivverent <divverent@d7cf8633-e32d-0410-b094-e92efae38249>
Sat, 9 Jan 2010 18:46:49 +0000 (18:46 +0000)
git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9817 d7cf8633-e32d-0410-b094-e92efae38249

fs.c

diff --git a/fs.c b/fs.c
index 775d766bd608193913e787d774a29d0e4deb289c..af163ce116247b6689564ca2dc1bec237bbf7248 100644 (file)
--- a/fs.c
+++ b/fs.c
@@ -1046,11 +1046,15 @@ static qboolean FS_AddPack_Fullpath(const char *pakfile, const char *shortname,
                }
                search->pack = pak;
                if(!pak)
-                       search->filename = fn;
-               if(strlen(filename) >= strlen(shortname))
-                       search->vpack = search->filename + strlen(search->filename) - strlen(shortname);
+               {
+                       strlcpy(search->filename, pakfile, sizeof(search->filename));
+                       if(strlen(search->filename) >= strlen(shortname))
+                               search->vpack = search->filename + strlen(search->filename) - strlen(shortname);
+                       else
+                               search->vpack = search->filename;
+               }
                else
-                       search->vpack = search->filename;
+                       search->vpack = search->pack->shortname;
                return true;
        }
        else