# HG changeset patch # User Matti Hamalainen # Date 1540536891 -10800 # Node ID 307a52e0dc04f7c4e39e1104ac298522065dee63 # Parent f41bc7203a16968fd2a00a7782517ebd9ae2f880 Make a internal copy of the const DMImageConvSpec in dmWriteIFFImage(). diff -r f41bc7203a16 -r 307a52e0dc04 tools/libgfx.c --- a/tools/libgfx.c Thu Oct 25 20:19:53 2018 +0300 +++ b/tools/libgfx.c Fri Oct 26 09:54:51 2018 +0300 @@ -2066,13 +2066,16 @@ } -int dmWriteIFFImage(DMResource *fp, const DMImage *img, const DMImageConvSpec *spec) +int dmWriteIFFImage(DMResource *fp, const DMImage *img, const DMImageConvSpec *cpspec) { Uint32 idsig; DMIFF iff; Uint8 *buf = NULL; size_t bufLen; int res = DMERR_OK; + DMImageConvSpec pspec, *spec = &pspec; + + memcpy(&pspec, cpspec, sizeof(DMImageConvSpec)); // XXX: Non-paletted ILBM not supported! if (!spec->paletted)