Mercurial > hg > dmlib
changeset 2025:307a52e0dc04
Make a internal copy of the const DMImageConvSpec in dmWriteIFFImage().
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Fri, 26 Oct 2018 09:54:51 +0300 |
parents | f41bc7203a16 |
children | b137d324e13f |
files | tools/libgfx.c |
diffstat | 1 files changed, 4 insertions(+), 1 deletions(-) [+] |
line wrap: on
line diff
--- 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)