The issue is caused by 087612c042 which changed type of
vpd->paintcol from byte to float. Some of the code was
expecting it to be byte, and did C-style cast to a pointer
of uchar.
This is a minimalistic fix, which makes it so the
paint_and_tex_color_alpha() operates on proper types and
avoids reading from the result color before overriding the
value.
Pull Request: https://projects.blender.org/blender/blender/pulls/117030