Update uchardet-tests.c

This commit is contained in:
Lucinda May Phipps 2022-04-23 03:07:03 +00:00 committed by Jehan Pagès
parent 383bf118c9
commit ef19faa8c5

View File

@ -52,9 +52,11 @@ detect(FILE *fp)
char buffer[BUFFER_SIZE];
int i;
while (!feof(fp))
while (1)
{
size_t len = fread(buffer, 1, BUFFER_SIZE, fp);
if (len == 0)
break;
int retval = uchardet_handle_data(handle, buffer, len);
if (retval != 0)
{