don't return EOF if some data was available

merge-requests/1/head
Stphane Voltz 2011-01-31 06:43:11 +01:00
rodzic d0ea6b8647
commit 5ea5757579
1 zmienionych plików z 4 dodań i 4 usunięć

Wyświetl plik

@ -7909,6 +7909,10 @@ sane_read (SANE_Handle handle, SANE_Byte * buf, SANE_Int max_len,
}
*len = 0;
if(dev->total_bytes_read>=dev->total_bytes_to_read)
{
return SANE_STATUS_EOF;
}
if (!s->scanning)
{
@ -7934,10 +7938,6 @@ sane_read (SANE_Handle handle, SANE_Byte * buf, SANE_Int max_len,
}
memcpy(buf,dev->img_buffer+dev->total_bytes_read,local_len);
dev->total_bytes_read+=local_len;
if(dev->total_bytes_read>=dev->total_bytes_to_read)
{
status=SANE_STATUS_EOF;
}
}
*len = local_len;