Fixing up my paranoia. Only fill in some of these fields if the entry is actually going to be fully used.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2848 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Spoike 2008-01-09 00:31:18 +00:00
parent b583f3ce6d
commit bda148a084

View file

@ -42,10 +42,6 @@ int VM_fopen (char *name, int *handle, int fmode, int owner)
return -1;
}
Q_strncpyz(vm_fopen_files[i].name, name, sizeof(vm_fopen_files[i].name));
vm_fopen_files[i].accessmode = fmode;
vm_fopen_files[i].owner = owner;
switch (fmode)
{
case VM_FS_READ:
@ -76,6 +72,10 @@ int VM_fopen (char *name, int *handle, int fmode, int owner)
return -1;
}
Q_strncpyz(vm_fopen_files[i].name, name, sizeof(vm_fopen_files[i].name));
vm_fopen_files[i].accessmode = fmode;
vm_fopen_files[i].owner = owner;
*handle = i+1;
return vm_fopen_files[i].len;
}