From 1179bed2ebc892dc918aae09dae586c516d0e36e Mon Sep 17 00:00:00 2001 From: Thomas White Date: Mon, 22 Aug 2022 15:47:53 +0200 Subject: image_create_dp_bad_sat: Initialise saturation array to infinity --- libcrystfel/src/image.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libcrystfel/src/image.c') diff --git a/libcrystfel/src/image.c b/libcrystfel/src/image.c index 3593f52b..3448421e 100644 --- a/libcrystfel/src/image.c +++ b/libcrystfel/src/image.c @@ -764,6 +764,7 @@ int image_create_dp_bad_sat(struct image *image, for ( i=0; in_panels; i++ ) { + int j; size_t nel = PANEL_WIDTH(&dtempl->panels[i]) * PANEL_HEIGHT(&dtempl->panels[i]); image->dp[i] = malloc(nel*sizeof(float)); @@ -785,6 +786,10 @@ int image_create_dp_bad_sat(struct image *image, return 1; } + for ( j=0; jsat[i][j] = INFINITY; + } + } return 0; -- cgit v1.2.3