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:
Mark Olsen 2006-02-22 02:43:51 +00:00
parent 2abfd728bf
commit 28b018e419
1 changed files with 4 additions and 4 deletions

View File

@ -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;
}
}