国产系统sane_read流程是否结束,通过读取size大小判断改为返回一次SANE_STATUS_EOF判断

This commit is contained in:
yangjiaxuan 2024-03-04 09:37:20 +08:00
parent d87b8c8418
commit 0ff946eab1
1 changed files with 1 additions and 1 deletions

View File

@ -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);