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) ...@@ -246,6 +246,7 @@ void GeDyn::open( ifstream& fp)
int tmp; int tmp;
char dummy[40]; char dummy[40];
GeDynElem *e; GeDynElem *e;
int errcnt = 0;
for (;;) for (;;)
{ {
...@@ -304,6 +305,9 @@ void GeDyn::open( ifstream& fp) ...@@ -304,6 +305,9 @@ void GeDyn::open( ifstream& fp)
default: default:
cout << "GeDyn:open syntax error" << endl; cout << "GeDyn:open syntax error" << endl;
fp.getline( dummy, sizeof(dummy)); fp.getline( dummy, sizeof(dummy));
errcnt++;
if ( errcnt > 20)
exit(0);
} }
if ( e) { if ( e) {
insert_element( 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