forked from github/server
fixed an error reading old datafiles (vortex not read properly)
This commit is contained in:
parent
d418aca832
commit
af5477286b
|
@ -103,12 +103,17 @@ static void
|
|||
txt_r_tok_buf(struct storage * store, char * result, size_t size)
|
||||
{
|
||||
char format[16];
|
||||
if (result && size>0) {
|
||||
format[0]='%';
|
||||
sprintf(format+1, "%us", size);
|
||||
fscanf((FILE *)store->userdata, format, result);
|
||||
if (result[0]==NULL_TOKEN) {
|
||||
result[0] = 0;
|
||||
}
|
||||
} else {
|
||||
/* trick to skip when no result expected */
|
||||
fscanf((FILE *)store->userdata, "%*s", format);
|
||||
}
|
||||
}
|
||||
|
||||
static int
|
||||
|
|
Loading…
Reference in New Issue