diff options
author | Brad King <brad.king@kitware.com> | 2007-04-19 16:56:07 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2007-04-19 16:56:07 (GMT) |
commit | a43b3cc801ad07086227536b05bff9ab584bf221 (patch) | |
tree | e204059a27ea6fa665d9f9b908d334a86f609986 /Source | |
parent | 6984c0931036abab85c857b588025554006464d9 (diff) | |
download | CMake-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.cxx | 6 |
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) { |