From eb3ea06fc9db0ecc3c9baf31a6d7261d7eac180c Mon Sep 17 00:00:00 2001 From: Denis Pauk Date: Sat, 31 Aug 2024 16:13:09 +0300 Subject: [PATCH] pcx: make palette marker optional --- src/client/cl_image.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/client/cl_image.c b/src/client/cl_image.c index 3899be19..0778024e 100644 --- a/src/client/cl_image.c +++ b/src/client/cl_image.c @@ -360,9 +360,15 @@ PCX_Decode(const char *name, const byte *raw, int len, byte **pic, byte **palett return; } - if ((len > 768) && (((byte *)pcx)[len - 769] == 0x0C)) + if (len > 768) { memcpy(*palette, (byte *)pcx + len - 768, 768); + + if ((((byte *)pcx)[len - 769] != 0x0C)) + { + Com_DPrintf("%s: %s has no palette marker\n", + __func__, name); + } } else {