summaryrefslogtreecommitdiffstats
path: root/Source
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2007-04-19 16:56:07 (GMT)
committerBrad King <brad.king@kitware.com>2007-04-19 16:56:07 (GMT)
commita43b3cc801ad07086227536b05bff9ab584bf221 (patch)
treee204059a27ea6fa665d9f9b908d334a86f609986 /Source
parent6984c0931036abab85c857b588025554006464d9 (diff)
downloadCMake-a43b3cc801ad07086227536b05bff9ab584bf221.zip
CMake-a43b3cc801ad07086227536b05bff9ab584bf221.tar.gz
CMake-a43b3cc801ad07086227536b05bff9ab584bf221.tar.bz2
BUG: Need to clear read failure when string is reset.
Diffstat (limited to 'Source')
-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)
{