summaryrefslogtreecommitdiff
path: root/backend/plustek-usbshading.c
diff options
context:
space:
mode:
authorJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-24 18:45:34 +0200
committerJörg Frings-Fürst <debian@jff-webhosting.net>2020-08-24 18:45:34 +0200
commit2b3e02411ecc09e7d41741b5587655c9b2f955b7 (patch)
treed839746371ecb8ed64ac81d2e37c11fcd25a00ac /backend/plustek-usbshading.c
parent787fb1d54ec9ee5fb941ae897fb201feb9cb2fd1 (diff)
parentad38bc6ecb80ddeb562841b33258dd53659b1da6 (diff)
Update upstream source from tag 'upstream/1.0.31'
Update to upstream version '1.0.31' with Debian dir aa7a39fe56343f5e164eec83783f4c923a394865
Diffstat (limited to 'backend/plustek-usbshading.c')
-rw-r--r--backend/plustek-usbshading.c6
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;