Endian fixed the pak-reading code.
git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@1990 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
parent
2abfd728bf
commit
28b018e419
1 changed files with 4 additions and 4 deletions
|
@ -142,15 +142,15 @@ FILE *FindInPaks(char *gamedir, char *filename, int *size)
|
|||
fclose(f);
|
||||
continue;
|
||||
}
|
||||
numfiles = header[2]/sizeof(pakfile);
|
||||
fseek(f, header[1], SEEK_SET);
|
||||
numfiles = LittleLong(header[2])/sizeof(pakfile);
|
||||
fseek(f, LittleLong(header[1]), SEEK_SET);
|
||||
for (j = 0; j < numfiles; j++)
|
||||
{
|
||||
fread(&pf, 1, sizeof(pf), f);
|
||||
if (!strcmp(pf.name, filename))
|
||||
{
|
||||
fseek(f, pf.offset, 0);
|
||||
*size = pf.length;
|
||||
fseek(f, LittleLong(pf.offset), 0);
|
||||
*size = LittleLong(pf.length);
|
||||
return f;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue