From caf7e1b2bd792114a04b9664bc10a1d8c918f0c2 Mon Sep 17 00:00:00 2001 From: Ingo Date: Sat, 23 May 2015 13:43:58 +0200 Subject: [PATCH] Fixed an endless loop when using camconst entry without white level, no Issue --- rtengine/rawimage.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rtengine/rawimage.cc b/rtengine/rawimage.cc index f206a25d2..6931f32b6 100755 --- a/rtengine/rawimage.cc +++ b/rtengine/rawimage.cc @@ -455,7 +455,7 @@ int RawImage::loadRaw (bool loadData, bool closeFile, ProgressListener *plistene // load 4 channel white level here, will be used if available if (RT_whitelevel_from_constant) { maximum_c4[i] = cc->get_WhiteLevel(i, iso_speed, aperture); - if(tiff_bps > 0 && !isFoveon()) { + if(tiff_bps > 0 && maximum_c4[i] > 0 && !isFoveon()) { unsigned compare = ((uint64_t)1 << tiff_bps) - 1; // use uint64_t to avoid overflow if tiff_bps == 32 while(maximum_c4[i] > compare) maximum_c4[i] >>= 1;