fix bad loop increments in p2i() and p2f()

Fixes: 7a4af2b767
This commit is contained in:
Rolf Eike Beer 2019-07-01 20:25:52 +02:00
parent 9300ced1e1
commit 0e0afd4acf

View File

@ -1041,7 +1041,7 @@ static void
p2i(UINT8* out_, const UINT8* in, int xsize, const UINT8* palette)
{
int x;
for (x = 0; x < xsize; x++, in += 2, out_ += 4) {
for (x = 0; x < xsize; x++, out_ += 4) {
INT32 v = L(&palette[in[x]*4]) / 1000;
memcpy(out_, &v, sizeof(v));
}
@ -1060,7 +1060,7 @@ static void
p2f(UINT8* out_, const UINT8* in, int xsize, const UINT8* palette)
{
int x;
for (x = 0; x < xsize; x++, in += 2, out_ += 4) {
for (x = 0; x < xsize; x++, out_ += 4) {
FLOAT32 v = L(&palette[in[x]*4]) / 1000.0F;
memcpy(out_, &v, sizeof(v));
}