From 0ff946eab17b4aafea48cdf349d8668f10a37e3a Mon Sep 17 00:00:00 2001 From: yangjiaxuan <171295266@qq.com> Date: Mon, 4 Mar 2024 09:37:20 +0800 Subject: [PATCH] =?UTF-8?q?=E5=9B=BD=E4=BA=A7=E7=B3=BB=E7=BB=9Fsane=5Fread?= =?UTF-8?q?=E6=B5=81=E7=A8=8B=E6=98=AF=E5=90=A6=E7=BB=93=E6=9D=9F=EF=BC=8C?= =?UTF-8?q?=E9=80=9A=E8=BF=87=E8=AF=BB=E5=8F=96size=E5=A4=A7=E5=B0=8F?= =?UTF-8?q?=E5=88=A4=E6=96=AD=E6=94=B9=E4=B8=BA=E8=BF=94=E5=9B=9E=E4=B8=80?= =?UTF-8?q?=E6=AC=A1SANE=5FSTATUS=5FEOF=E5=88=A4=E6=96=AD?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- modules/sane_user/HGSaneImpl.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/sane_user/HGSaneImpl.cpp b/modules/sane_user/HGSaneImpl.cpp index d2527071..f70a773b 100644 --- a/modules/sane_user/HGSaneImpl.cpp +++ b/modules/sane_user/HGSaneImpl.cpp @@ -1059,7 +1059,7 @@ void HGAPI HGSaneDeviceImpl::ThreadFunc(HGThread thread, HGPointer param) SANE_Int readSize = 0; SANE_Status stat2 = SANE_STATUS_GOOD; - while (readSize < bufferSize) + while (SANE_STATUS_EOF != stat2) { SANE_Int len = 0; stat2 = saneAPI.sane_read_api(p->m_devHandle, buffer + readSize, bufferSize - readSize, &len);