Mercurial > hg > dmlib
diff tools/lib64gfx.c @ 1747:5e928618fdc8
Change DMGrowBuf API somewhat and implement more copy operations.
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Mon, 11 Jun 2018 13:57:07 +0300 |
parents | e40227e994e2 |
children | b9f3c1796fba |
line wrap: on
line diff
--- a/tools/lib64gfx.c Sun Jun 10 20:01:03 2018 +0300 +++ b/tools/lib64gfx.c Mon Jun 11 13:57:07 2018 +0300 @@ -1373,7 +1373,7 @@ if (probeOffs >= buf->len) return DMERR_OUT_OF_DATA; - dmGrowBufCreateFromOffs(&tmp, buf, probeOffs); + dmGrowBufConstCopyOffs(&tmp, buf, probeOffs); if (dmC64ProbeBMP(tmp.data, tmp.len, fmt) == DM_PROBE_SCORE_FALSE) return DMERR_NOT_SUPPORTED; } @@ -1392,7 +1392,7 @@ if ((*img = dmC64ImageAlloc(*fmt)) == NULL) return DMERR_MALLOC; - dmGrowBufCreateFromOffs(&tmp, buf, loadOffs); + dmGrowBufConstCopyOffs(&tmp, buf, loadOffs); // Decode the bitmap to memory layout if ((*fmt)->decode != NULL)