Fix case when no section at top of input file

This fixes issue #13
This commit is contained in:
Elad Salomons
2015-09-20 22:44:31 +03:00
parent bdcf3d77d5
commit f894ade5ee

View File

@@ -217,6 +217,8 @@ int readdata()
/* Otherwise process next line of input in current section */
else
{
if (sect >=0) //for cases were no section is present on the top of the input file
{
inperr = newline(sect,line);
if (inperr > 0)
@@ -225,6 +227,12 @@ int readdata()
errsum++;
}
}
else
{
errcode = 200;
break;
}
}
/* Stop if reach end of file or max. error count */
if (errsum == MAXERRS) break;