diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-09-10 19:11:27 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-09-10 19:11:27 +0200 |
commit | 7e9455b3b15671ff99ed168638c405e2acedb6df (patch) | |
tree | 444e59ece236e09dc153f665e42160aeb0208c24 /backend/plustek-usbshading.c | |
parent | bc8a517abd2e11e1435f4ef042cfcc8648b62ef7 (diff) | |
parent | bce41b3c37c2a68e7dab234ce0247755a61ceb40 (diff) |
Merge branch 'release/debian/1.0.31-1_experimental1' into masterdebian/1.0.31-1_experimental1
Diffstat (limited to 'backend/plustek-usbshading.c')
-rw-r--r-- | backend/plustek-usbshading.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/backend/plustek-usbshading.c b/backend/plustek-usbshading.c index 98a28d9..e789b43 100644 --- a/backend/plustek-usbshading.c +++ b/backend/plustek-usbshading.c @@ -882,7 +882,7 @@ TOGAIN: if( m_ScanParam.bDataType == SCANDATATYPE_Color ) { RGBULongDef rgb, rgbSum; - u_long dwLoop = len / 20 * 20; + u_long dwLoop = (len - start) / 20 * 20; u_long dw10, dwGray, dwGrayMax; rgb.Red = rgb.Green = rgb.Blue = dwGrayMax = 0; @@ -923,7 +923,7 @@ TOGAIN: } else { u_long dwMax = 0, dwSum; - u_long dwLoop = len / 20 * 20; + u_long dwLoop = (len - start) / 20 * 20; u_long dw10; for( dw = start; dwLoop; dwLoop-- ) { @@ -951,7 +951,7 @@ TOGAIN: RGBUShortDef max_rgb, min_rgb, tmp_rgb; u_long dwR, dwG, dwB; u_long dwDiv = 10; - u_long dwLoop1 = len / dwDiv, dwLoop2; + u_long dwLoop1 = (len - start) / dwDiv, dwLoop2; max_rgb.Red = max_rgb.Green = max_rgb.Blue = 0; min_rgb.Red = min_rgb.Green = min_rgb.Blue = 0xffff; |