Endian bugs suck; CSQC now works on big endian systems.

git-svn-id: https://svn.code.sf.net/p/fteqw/code/trunk@2881 fc73d0e0-1445-4013-8a0c-d673dee63da5
This commit is contained in:
Mark Olsen 2008-01-27 13:52:54 +00:00
parent ff6630d28c
commit 0aa29e47e7

View file

@ -3542,7 +3542,7 @@ qbyte *CSQC_PRLoadFile (char *path, void *buffer, int bufsize)
}
else
{
if (Com_BlockChecksum(file, com_filesize) == csqcchecksum) //and the user wasn't trying to be cunning.
if (LittleLong(Com_BlockChecksum(file, com_filesize)) == csqcchecksum) //and the user wasn't trying to be cunning.
return file;
}
}
@ -3557,7 +3557,7 @@ qbyte *CSQC_PRLoadFile (char *path, void *buffer, int bufsize)
}
else
{
if (Com_BlockChecksum(file, com_filesize) != csqcchecksum)
if (LittleLong(Com_BlockChecksum(file, com_filesize)) != csqcchecksum)
return NULL; //not valid
}
@ -3591,7 +3591,7 @@ int CSQC_PRFileSize (char *path)
}
else
{
if (Com_BlockChecksum(file, com_filesize) == csqcchecksum) //and the user wasn't trying to be cunning.
if (LittleLong(Com_BlockChecksum(file, com_filesize)) == csqcchecksum) //and the user wasn't trying to be cunning.
return com_filesize+1;
}
}
@ -3606,7 +3606,7 @@ int CSQC_PRFileSize (char *path)
}
else
{
if (Com_BlockChecksum(file, com_filesize) != csqcchecksum)
if (LittleLong(Com_BlockChecksum(file, com_filesize)) != csqcchecksum)
return -1; //not valid
}
}