Commit 8f1a7c74 authored by claes's avatar claes

Limitation in number of open errors

parent b9ee14b3
......@@ -246,6 +246,7 @@ void GeDyn::open( ifstream& fp)
int tmp;
char dummy[40];
GeDynElem *e;
int errcnt = 0;
for (;;)
{
......@@ -304,6 +305,9 @@ void GeDyn::open( ifstream& fp)
default:
cout << "GeDyn:open syntax error" << endl;
fp.getline( dummy, sizeof(dummy));
errcnt++;
if ( errcnt > 20)
exit(0);
}
if ( e) {
insert_element( e);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment