fixed an error reading old datafiles (vortex not read properly)

This commit is contained in:
Enno Rehling 2008-06-18 08:24:11 +00:00
parent d418aca832
commit af5477286b
1 changed files with 10 additions and 5 deletions

View File

@ -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