defs.c: in '2dcol' DEF token, clamp R, G, B values to [0 .. 63].

git-svn-id: https://svn.eduke32.com/eduke32@4232 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
helixhorned 2013-12-31 11:51:52 +00:00
parent 70d84cd75b
commit 74f789d083

View file

@ -429,6 +429,10 @@ static int32_t defsparser(scriptfile *script)
if ((unsigned)col < 256)
{
r = clamp(r, 0, 63);
g = clamp(g, 0, 63);
b = clamp(b, 0, 63);
vgapal16[col*4+0] = b; // blue
vgapal16[col*4+1] = g; // green
vgapal16[col*4+2] = r; // red