[ruamoko] Avoid copying a block of memory to itself

Not a big deal, but valgrind didn't like it.
This commit is contained in:
Bill Currie 2023-03-28 13:21:57 +09:00
parent 9317ce7358
commit 451a98d391

View file

@ -313,8 +313,10 @@ generate_colormap (void)
}
}
}
// fullbrights
memcpy (colors[i][224], colors[31][224], 32 * 3);
// fullbrights, but avoid copying the source row to itself
if (i != 31) {
memcpy (colors[i][224], colors[31][224], 32 * 3);
}
}
tex_t *cmap = ConvertImage (&tex, default_palette[0]);
// the colormap has an extra byte indicating the number of fullbright