core: Fix strict-aliasing error on ASE load

Resolves #10359

When compiled with -Werror=strict-aliasing, the build fails
on this line due to converting pointer datatypes.
This patch switches to using memcpy () instead.
This commit is contained in:
Alx Sa 2023-11-19 13:53:18 +00:00
parent ef65db052f
commit 2c68021b54
1 changed files with 1 additions and 1 deletions

View File

@ -1158,7 +1158,7 @@ gimp_palette_load_ase (GimpContext *context,
/* Convert 4 bytes to a 32bit float value */
tmp = GINT32_FROM_BE (tmp);
pixels[j] = *(gfloat *) &tmp;
memcpy (&pixels[j], &tmp, 4);
}
if (! valid_color)