From 0a92028c56f064c42a81f48ce06e6f611dc3241b Mon Sep 17 00:00:00 2001 From: tth Date: Sat, 3 Apr 2021 05:21:17 +0200 Subject: [PATCH] killed a bug in fimg_clear ! --- floatimg.h | 2 +- lib/fimg-core.c | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/floatimg.h b/floatimg.h index 206e30bd..c52658bc 100644 --- a/floatimg.h +++ b/floatimg.h @@ -4,7 +4,7 @@ * http://la.buvette.org/photos/cumul */ -#define FIMG_VERSION 129 +#define FIMG_VERSION 130 /* * in memory descriptor diff --git a/lib/fimg-core.c b/lib/fimg-core.c index 7ea0d46a..475249b8 100644 --- a/lib/fimg-core.c +++ b/lib/fimg-core.c @@ -79,8 +79,7 @@ if( ! fimg_type_is_valid(head->type) ) { } printf(" type %d %s\n", head->type, fimg_str_type(head->type)); -printf(" dims %d x %d\n", - head->width, head->height); +printf(" dims %d x %d\n", head->width, head->height); printf(" fval/count %f %d\n", head->fval, head->count); printf(" pixels@ %p %p %p %p\n", @@ -249,6 +248,8 @@ if ( ! fimg_type_is_valid(fimg->type) ) { size = fimg->width * fimg->height * sizeof(float); memset(fimg->R, 0, size); +memset(fimg->G, 0, size); +memset(fimg->B, 0, size); return 0; }