]> git.xonotic.org Git - xonotic/gmqcc.git/blobdiff - pak.c
Prevent negitive numbers from being used as the left operand of shift operator.
[xonotic/gmqcc.git] / pak.c
diff --git a/pak.c b/pak.c
index 0f90d675133dbca860bf9aa709f89d0a3cb7f411..048469b9d497c47315236b2b663d9e9bceb00c71 100644 (file)
--- a/pak.c
+++ b/pak.c
@@ -26,7 +26,7 @@
  * The PAK format uses a FOURCC concept for storing the magic ident within
  * the header as a uint32_t.
  */
-#define PAK_FOURCC ((uint32_t)(('P' | ('A' << 8) | ('C' << 16) | ('K' << 24))))
+#define PAK_FOURCC ((uint32_t)(((uint8_t)'P'|((uint8_t)'A'<<8)|((uint8_t)'C'<<16)|((uint8_t)'K'<<24))))
 
 typedef struct {
     uint32_t magic;  /* "PACK" */