From 24123421ac90801b89e9a11df77e3b27440b0e60 Mon Sep 17 00:00:00 2001 From: giraffedata Date: Sat, 5 Aug 2023 22:48:32 +0000 Subject: Fix previous commit git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@4573 9d0c8265-081b-0410-96cb-a4ca84ce46f8 --- other/pamstack.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'other') diff --git a/other/pamstack.c b/other/pamstack.c index 3f974a3a..285e02c0 100644 --- a/other/pamstack.c +++ b/other/pamstack.c @@ -13,6 +13,7 @@ -----------------------------------------------------------------------------*/ #include +#include #include "pm_c_util.h" #include "mallocvar.h" @@ -236,8 +237,10 @@ processOneImageInAllStreams(unsigned int const nInput, if (inpam[inputSeq].maxval != inpam[0].maxval) allImagesSameMaxval = false; + assert(PAM_OVERALL_MAXVAL <= UINT_MAX-1); + maxvalLcm = pm_lcm(maxvalLcm + 1, inpam[inputSeq].maxval + 1, 1, - PAM_OVERALL_MAXVAL) - 1; + PAM_OVERALL_MAXVAL + 1) - 1; outputDepth += inpam[inputSeq].depth; } -- cgit 1.4.1