From a587a66af83e45a9a5b58aa4fc54c823b33632a5 Mon Sep 17 00:00:00 2001 From: tonton th Date: Wed, 2 Dec 2020 14:57:20 +0100 Subject: [PATCH] removing some wtf code --- Fonderie/fonctions.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Fonderie/fonctions.c b/Fonderie/fonctions.c index 0ee6a19f..328df762 100644 --- a/Fonderie/fonctions.c +++ b/Fonderie/fonctions.c @@ -66,8 +66,7 @@ for (idx=0; idxnbslots; idx += step) { return 0; } /* -------------------------------------------------------------- */ -/* -------------------------------------------------------------- */ -/* +/* called by 'fonderie.c' * this func save the fifo content as * - float FIMG * - 16 bits PNM @@ -131,8 +130,10 @@ int nbre; dst = &g_fifo.slots[g_fifo.next]; -nbre = dst->width * dst->height * dst->type; -memcpy(dst->R, src->R, nbre*sizeof(float)); +nbre = dst->width * dst->height * sizeof(float); +memcpy(dst->R, src->R, nbre); +memcpy(dst->G, src->G, nbre); +memcpy(dst->B, src->B, nbre); g_fifo.next++, g_fifo.next %= g_fifo.nbslots; // maybe we can write :