git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@9817
d7cf8633-e32d-0410-b094-
e92efae38249
}
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