Fix the interpretation of old-format PALETTE.DAT

Backported from PCExhumed.

git-svn-id: https://svn.eduke32.com/eduke32@8436 1a8010ca-5511-0410-912e-c29ae57300e0

# Conflicts:
#	source/build/src/palette.cpp
This commit is contained in:
hendricks266 2019-12-18 09:31:10 +00:00 committed by Christoph Oelckers
parent 6eec629cfd
commit efc7365df9

View file

@ -265,13 +265,15 @@ void paletteLoadFromDisk(void)
// Read the entries above and on the diagonal, if the table is
// thought as being row-major.
if (read_and_test(fil, &transluc[256*i + i], 256-i-1))
if (read_and_test(fil, &transluc[256*i + i + 1], 255-i))
return;
// Duplicate the entries below the diagonal.
for (bssize_t j=0; j<i; j++)
transluc[256*i + j] = transluc[256*j + i];
for (bssize_t j=i+1; j<256; j++)
transluc[256*j + i] = transluc[256*i + j];
}
for (bssize_t i=0; i<256; i++)
transluc[256*i + i] = i;
}
else
{