mirror of
https://github.com/vivier/EMILE.git
synced 2025-01-04 19:31:34 +00:00
read_description() should return 0 on the last item and not EOF
This commit is contained in:
parent
6b07f02989
commit
f5963dc437
@ -243,9 +243,8 @@ static int read_description(FILE* fd, char* desc, int size)
|
|||||||
char name[256];
|
char name[256];
|
||||||
char value[1024];
|
char value[1024];
|
||||||
int found = 0;
|
int found = 0;
|
||||||
int ret;
|
|
||||||
|
|
||||||
while ((ret = read_line(fd, name, value)) != -1)
|
while (read_line(fd, name, value) != -1)
|
||||||
{
|
{
|
||||||
if (strcmp("title", name) == 0)
|
if (strcmp("title", name) == 0)
|
||||||
{
|
{
|
||||||
@ -284,7 +283,7 @@ static int read_description(FILE* fd, char* desc, int size)
|
|||||||
}
|
}
|
||||||
offset = ftell(fd);
|
offset = ftell(fd);
|
||||||
}
|
}
|
||||||
return ret;
|
return found ? 0 : -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
int emile_config_read_next(emile_config* config)
|
int emile_config_read_next(emile_config* config)
|
||||||
|
Loading…
Reference in New Issue
Block a user