diff --git a/pub/src/list.h b/pub/src/list.h index 9122e6557398e000cfc91b063ceb4d740597893a..d3ad41a55b3bbfb9da8891033cd05f9711d09005 100644 --- a/pub/src/list.h +++ b/pub/src/list.h @@ -66,7 +66,7 @@ public: bool evaluated() const { return !limneeded || limgiven; } uint size() const { return V.size(); }; bool contains( uint val ) const; - bool all_between( int imi, int ima ); // OBSOLETE + bool all_between( int imi, int ima ); string str() const; friend ostream& operator<< ( ostream& s, CList L ) { return s << L.str(); }; diff --git a/pub/src/mem.cpp b/pub/src/mem.cpp index 5dd601ab5eb3866c084fb14e1ee11523d0ffa125..a0d537ef4d24101d869cf587b77e16934525867b 100644 --- a/pub/src/mem.cpp +++ b/pub/src/mem.cpp @@ -131,9 +131,12 @@ namespace NOlm { MyIterate::MyIterate( int mode ) { if ( mode & IterALL ) - Sel = CList(0,MOM.size()-1); - else + Sel = CList( 0,MOM.size()-1 ); + else { + if ( !FSel.all_between( 0,MOM.size()-1 ) ) + throw "invalid file selection"; Sel = FSel; + } reset(); };