summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Source/kwsys/testIOS.cxx6
1 files changed, 6 insertions, 0 deletions
diff --git a/Source/kwsys/testIOS.cxx b/Source/kwsys/testIOS.cxx
index 7c02a1b..e4e0a2d 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)
{