mirror of
https://github.com/yquake2/yquake2remaster.git
synced 2024-11-10 07:12:07 +00:00
pcx: make palette marker optional
This commit is contained in:
parent
b3efe338c1
commit
eb3ea06fc9
1 changed files with 7 additions and 1 deletions
|
@ -360,9 +360,15 @@ PCX_Decode(const char *name, const byte *raw, int len, byte **pic, byte **palett
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((len > 768) && (((byte *)pcx)[len - 769] == 0x0C))
|
if (len > 768)
|
||||||
{
|
{
|
||||||
memcpy(*palette, (byte *)pcx + len - 768, 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
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in a new issue