From 0aa29e47e78c2be037f2a9ef9b55a18fefb13ba9 Mon Sep 17 00:00:00 2001 From: Mark Olsen Date: Sun, 27 Jan 2008 13:52:54 +0000 Subject: [PATCH] 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 --- engine/client/pr_csqc.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/engine/client/pr_csqc.c b/engine/client/pr_csqc.c index 8f7c84cf1..830c5a1f1 100644 --- a/engine/client/pr_csqc.c +++ b/engine/client/pr_csqc.c @@ -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 } }