diff --git a/Source/kwsys/testIOS.cxx b/Source/kwsys/testIOS.cxx index 7c02a1bcd..e4e0a2d30 100644 --- a/Source/kwsys/testIOS.cxx +++ b/Source/kwsys/testIOS.cxx @@ -68,6 +68,12 @@ int testIOS(int, char*[]) kwsys_ios::cerr << "Able to read past end of stream" << kwsys_ios::endl; return 1; } + else + { + // Clear the failure. + istr.clear(istr.rdstate() & ~kwsys_ios::ios::eofbit); + istr.clear(istr.rdstate() & ~kwsys_ios::ios::failbit); + } istr.str("30"); if(istr >> x) {