From 447e1e94b299b9e43edace854089797d92e5f70e Mon Sep 17 00:00:00 2001 From: gb <741021719@qq.com> Date: Mon, 3 Jul 2023 14:53:18 +0800 Subject: [PATCH] =?UTF-8?q?xfercount=E5=8A=A01=E5=90=8E=E5=86=8D=E9=99=A4?= =?UTF-8?q?=E4=BB=A52=EF=BC=8C=E4=BF=9D=E8=AF=81=E5=A5=87=E6=95=B0?= =?UTF-8?q?=E5=BC=A0=E5=9B=BE=E7=89=87=E8=83=BD=E5=A4=9F=E5=87=BA=E5=9B=BE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- twain/twain/huagaods.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/twain/twain/huagaods.cpp b/twain/twain/huagaods.cpp index 3506316..8e80135 100644 --- a/twain/twain/huagaods.cpp +++ b/twain/twain/huagaods.cpp @@ -1795,6 +1795,7 @@ void huagao_ds::init_support_caps(void) if (dup && count >= 2) { + count++; count /= 2; } SET_SANE_OPT_EX(ret, scanner_, scan_count, &count); @@ -2361,12 +2362,12 @@ void huagao_ds::init_support_caps(void) int ret = SCANNER_ERR_OK; int count = count_; - if (dup && count_ >= 2) + if (dup && count >= 2) { count /= 2; SET_SANE_OPT_EX(ret, scanner_, scan_count, &count); } - else if (!dup && count_ >= 2) + else if (!dup && count >= 2) SET_SANE_OPT_EX(ret, scanner_, scan_count, &count) return CapSupGetAllReset(msg, data, dup, Bool(true));