diff options
author | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2020-08-08 20:25:41 +0000 |
---|---|---|
committer | giraffedata <giraffedata@9d0c8265-081b-0410-96cb-a4ca84ce46f8> | 2020-08-08 20:25:41 +0000 |
commit | 89bc85205463ed4eef7df54ff734580161da5892 (patch) | |
tree | bff0a66f932cc2358a42a27e794dc5c2e98ce93b /editor/pnmnorm.c | |
parent | de02aad9d230b317c9412cfce444a469778fad0c (diff) | |
download | netpbm-mirror-89bc85205463ed4eef7df54ff734580161da5892.tar.gz netpbm-mirror-89bc85205463ed4eef7df54ff734580161da5892.tar.xz netpbm-mirror-89bc85205463ed4eef7df54ff734580161da5892.zip |
Fix incorrect calculation of midpoint when bpercent and wpercent overlap
git-svn-id: http://svn.code.sf.net/p/netpbm/code/trunk@3907 9d0c8265-081b-0410-96cb-a4ca84ce46f8
Diffstat (limited to 'editor/pnmnorm.c')
-rw-r--r-- | editor/pnmnorm.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/editor/pnmnorm.c b/editor/pnmnorm.c index e0fe0e35..20d7eb04 100644 --- a/editor/pnmnorm.c +++ b/editor/pnmnorm.c @@ -487,7 +487,7 @@ disOverlap(xelval const reqBvalue, } } else { /* Both ends are free; use the point halfway between them. */ - xelval const midPoint = (reqWvalue + reqBvalue + maxval/2)/2; + xelval const midPoint = (reqWvalue + reqBvalue)/2; *nonOlapBvalueP = MIN(midPoint, maxval-1); *nonOlapWvalueP = *nonOlapBvalueP + 1; } |