From a540039d76ba0d263cf06ed943a8e284feaac233 Mon Sep 17 00:00:00 2001 From: June McEnroe Date: Wed, 28 Feb 2018 20:44:02 -0500 Subject: Use memmove in pngo where needed --- bin/pngo.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'bin') diff --git a/bin/pngo.c b/bin/pngo.c index 80721547..d783fa73 100644 --- a/bin/pngo.c +++ b/bin/pngo.c @@ -455,7 +455,7 @@ static void discardAlpha(void) { for (uint32_t y = 0; y < header.height; ++y) { *ptr++ = lines[y]->type; for (uint32_t x = 0; x < header.width; ++x) { - memcpy(ptr, &lines[y]->data[x * pixelSize], colorSize); + memmove(ptr, &lines[y]->data[x * pixelSize], colorSize); ptr += colorSize; } } @@ -482,10 +482,10 @@ static void discardColor(void) { *ptr++ = lines[y]->type; for (uint32_t x = 0; x < header.width; ++x) { uint8_t *pixel = &lines[y]->data[x * pixelSize]; - memcpy(ptr, pixel, sampleSize); + memmove(ptr, pixel, sampleSize); ptr += sampleSize; if (header.color == TRUECOLOR_ALPHA) { - memcpy(ptr, pixel + 3 * sampleSize, sampleSize); + memmove(ptr, pixel + 3 * sampleSize, sampleSize); ptr += sampleSize; } } -- cgit 1.4.1 c/diff/port?id=bb9a412a8c9736dc52fe9a7aee997ae5a6c582d8&follow=1'>diff
path: root/port (unfollow)
Commit message (Collapse)Author
2019-05-09Add Parable of the SowerJune McEnroe
2019-05-07Add bit without buildJune McEnroe
Need to do some stuff in the Makefile for lex and yacc and generating HTML pages for it.
2019-05-04Fix MANDIR typoJune McEnroe
2019-05-04Move relay to binJune McEnroe