[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 25c51e8711
commit eb41231559
1 changed files with 4 additions and 2 deletions

View File

@ -311,8 +311,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