Skip to content
Permalink
Browse files

cmod: Workaround 64-bit vector-optimized builds crashing while loadin…

…g bsps with unaligned lumps
  • Loading branch information...
Chomenor committed Sep 6, 2017
1 parent 178b8db commit bb87beaf06ee88a1716c31e95e7a1218a07d98c6
Showing with 8 additions and 0 deletions.
  1. +1 −0 code/cmod/cmod_defs.h
  2. +7 −0 code/qcommon/cm_load.c
@@ -69,3 +69,4 @@
#define CMOD_REDUCE_WARNINGS
#define CMOD_EVENT_QUEUE_SIZE
#define CMOD_VM_STRNCPY_FIX
#define CMOD_CM_ALIGN_FIX
@@ -23,6 +23,13 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA

#include "cm_local.h"

#ifdef CMOD_CM_ALIGN_FIX
// Workaround for some wacky bsps that don't use 4-byte aligned structures
#undef LittleLong
static __attribute__ ((noinline)) unsigned int LittleLong(unsigned int x) {
return x; }
#endif

#ifdef BSPC

#include "../bspc/l_qfiles.h"

0 comments on commit bb87bea

Please sign in to comment.
You can’t perform that action at this time.