mirror of
https://gitlab.freedesktop.org/uchardet/uchardet.git
synced 2025-12-08 01:36:41 +08:00
Update uchardet-tests.c
This commit is contained in:
parent
383bf118c9
commit
ef19faa8c5
@ -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)
|
||||
{
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user