diff options
author | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-24 18:44:51 +0200 |
---|---|---|
committer | Jörg Frings-Fürst <debian@jff-webhosting.net> | 2020-08-24 18:44:51 +0200 |
commit | ad38bc6ecb80ddeb562841b33258dd53659b1da6 (patch) | |
tree | e02e9c3ff760554fd87f70df0e18b88594091a48 /backend/plustek-usbshading.c | |
parent | 9c23ed018d72eed2554f4f9cff1ae6e6bb0cd479 (diff) |
New upstream version 1.0.31upstream/1.0.31
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; |