diff --git a/src/client/cl_image.c b/src/client/cl_image.c index c6dc1289..1de83dc0 100644 --- a/src/client/cl_image.c +++ b/src/client/cl_image.c @@ -265,9 +265,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 { diff --git a/src/client/refresh/files/pcx.c b/src/client/refresh/files/pcx.c index d5c7257c..ed541d7e 100644 --- a/src/client/refresh/files/pcx.c +++ b/src/client/refresh/files/pcx.c @@ -340,9 +340,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)) + { + R_Printf(PRINT_DEVELOPER, "%s: %s has no palette marker\n", + __func__, name); + } } else {